- bugfix do not overwrite 'smarty' template variable when {include ... scope=parent} exits

This commit is contained in:
uwe.tews@googlemail.com
2011-06-16 17:27:32 +00:00
parent bc96213c44
commit 4d07e3b03e
2 changed files with 5 additions and 2 deletions
+1 -1
View File
@@ -650,7 +650,7 @@ class Smarty_Internal_Template extends Smarty_Internal_Data {
$has_root = false;
foreach ($this->tpl_vars as $_key => $_variable) {
$_variable_scope = $this->tpl_vars[$_key]->scope;
if ($scope == Smarty::SCOPE_LOCAL && $_variable_scope == Smarty::SCOPE_LOCAL) {
if (($scope == Smarty::SCOPE_LOCAL && $_variable_scope == Smarty::SCOPE_LOCAL) || $_key == 'smarty') {
continue;
}
if (isset($this->parent) && ($scope == Smarty::SCOPE_PARENT || $_variable_scope == Smarty::SCOPE_PARENT)) {