"Only variable references should be returned by reference"

From: Date: Mon, 07 Nov 2005 17:54:14 +0000
Subject: "Only variable references should be returned by reference"
Groups: php.smarty.dev 
Request: Send a blank email to php-smarty-dev+get-2802@lists.php.net to get a copy of this message
Have such notices triggered by &get_config_vars() since upgrade to PHP 4.4.1 / Smarty 2.6.10: Run-time notice [8] Only variable references should be returned by reference in file "d:\docroots\tbweb\sys\libs\Smarty.class.php" line 1078 Similar bug was already fixed for &get_template_vars() in revision 1.518. Index: Smarty.class.php =================================================================== RCS file: /repository/smarty/libs/Smarty.class.php,v retrieving revision 1.519 diff -u -w -b -r1.519 Smarty.class.php --- Smarty.class.php 17 Aug 2005 14:59:25 -0000 1.519 +++ Smarty.class.php 7 Nov 2005 17:37:12 -0000 @@ -1077,6 +1077,10 @@
             return $this->_config[0]['vars'];
         } else if(isset($this->_config[0]['vars'][$name])) {
             return $this->_config[0]['vars'][$name];
+        } else {
+            // var non-existant, return valid reference
+            $_tmp = null;
+            return $_tmp;
         }
     }


« previous php.smarty.dev (#2802) next »