- bugfix getTemplateVars() should return 'null' instead dropping E_NOTICE on an unassigned variable

This commit is contained in:
uwe.tews@googlemail.com
2010-12-06 19:00:50 +00:00
parent 6ddcf3819a
commit ea37403f01
2 changed files with 4 additions and 1 deletions

View File

@@ -1,4 +1,7 @@
===== SVN trunk ===== ===== SVN trunk =====
06/12/2010
- bugfix getTemplateVars() should return 'null' instead dropping E_NOTICE on an unassigned variable
05/12/2010 05/12/2010
- bugfix missing declaration of $smarty in Smarty class - bugfix missing declaration of $smarty in Smarty class
- bugfix empty($foo) in {if} did drop a notice when $foo was not assigned - bugfix empty($foo) in {if} did drop a notice when $foo was not assigned

View File

@@ -184,7 +184,7 @@ class Smarty_Internal_Data {
function getTemplateVars($varname = null, $_ptr = null, $search_parents = true) function getTemplateVars($varname = null, $_ptr = null, $search_parents = true)
{ {
if (isset($varname)) { if (isset($varname)) {
$_var = $this->getVariable($varname, $_ptr, $search_parents); $_var = $this->getVariable($varname, $_ptr, $search_parents, false);
if (is_object($_var)) { if (is_object($_var)) {
return $_var->value; return $_var->value;
} else { } else {