From ea37403f010ea6ac4ec82c5c5bfd7ff9cdf3873f Mon Sep 17 00:00:00 2001 From: "uwe.tews@googlemail.com" Date: Mon, 6 Dec 2010 19:00:50 +0000 Subject: [PATCH] - bugfix getTemplateVars() should return 'null' instead dropping E_NOTICE on an unassigned variable --- change_log.txt | 3 +++ libs/sysplugins/smarty_internal_data.php | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/change_log.txt b/change_log.txt index 53e2e614..a4e8aff8 100644 --- a/change_log.txt +++ b/change_log.txt @@ -1,4 +1,7 @@ ===== SVN trunk ===== +06/12/2010 +- bugfix getTemplateVars() should return 'null' instead dropping E_NOTICE on an unassigned variable + 05/12/2010 - bugfix missing declaration of $smarty in Smarty class - bugfix empty($foo) in {if} did drop a notice when $foo was not assigned diff --git a/libs/sysplugins/smarty_internal_data.php b/libs/sysplugins/smarty_internal_data.php index 9246f7f6..17818827 100644 --- a/libs/sysplugins/smarty_internal_data.php +++ b/libs/sysplugins/smarty_internal_data.php @@ -184,7 +184,7 @@ class Smarty_Internal_Data { function getTemplateVars($varname = null, $_ptr = null, $search_parents = true) { if (isset($varname)) { - $_var = $this->getVariable($varname, $_ptr, $search_parents); + $_var = $this->getVariable($varname, $_ptr, $search_parents, false); if (is_object($_var)) { return $_var->value; } else {