]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Refs #1079: elgg_view() casts view to a string before attempting to call views.
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>
Mon, 1 Feb 2010 02:52:30 +0000 (02:52 +0000)
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>
Mon, 1 Feb 2010 02:52:30 +0000 (02:52 +0000)
git-svn-id: http://code.elgg.org/elgg/trunk@3877 36083f99-b078-4883-b0ff-0f9b5a30f544

engine/lib/elgglib.php

index cd426309d729c0525b10b45196746737ce39045d..8999a9c96135699b3b23c864b0fbccbeba778125 100644 (file)
@@ -173,10 +173,12 @@ function elgg_get_view_location($view, $viewtype = '') {
  * @param string $viewtype If set, forces the viewtype for the elgg_view call to be this value (default: standard detection)
  * @return string The HTML content
  */
-function elgg_view($view, $vars = array(), $bypass = false, $debug = false, $viewtype = '') {
+function elgg_view(string $view, $vars = array(), $bypass = false, $debug = false, $viewtype = '') {
        global $CONFIG;
        static $usercache;
 
+       $view = (string)$view;
+
        // basic checking for bad paths
        if (strpos($view, '..') !== false) {
                return false;