return valid reference in get_template_vars() when given var is non-existant

This commit is contained in:
mohrt
2005-08-17 14:58:32 +00:00
parent f4a53648c4
commit 56bd1fbbd0
2 changed files with 8 additions and 3 deletions

4
NEWS
View File

@@ -1,4 +1,6 @@
- add escape type "urlpathinfo" to escape modifier
- return valid reference in get_template_vars() when given var is
non-existant (monte)
- add escape type "urlpathinfo" to escape modifier (monte)
Version 2.6.10 (Aug 5, 2005)
----------------------------

View File

@@ -1055,9 +1055,12 @@ class Smarty
{
if(!isset($name)) {
return $this->_tpl_vars;
}
if(isset($this->_tpl_vars[$name])) {
} elseif(isset($this->_tpl_vars[$name])) {
return $this->_tpl_vars[$name];
} else {
// var non-existant, return valid reference
$_tmp = null
return $_tmp;
}
}