- optimization and code cleanup of {foreach} and {section} compiler

This commit is contained in:
Uwe Tews
2015-08-02 19:43:21 +02:00
parent 05a8fa245e
commit e205cb7a89
5 changed files with 130 additions and 166 deletions
@@ -232,7 +232,7 @@ class Smarty_Internal_Compile_Private_ForeachSection extends Smarty_Internal_Com
) {
$compiler->trigger_template_error("missing or illegal \$smarty.{$tag} property attribute", $compiler->lex->taglineno);
}
$tagVar = "'__{$tag}_{$name}'";
$tagVar = "'__smarty_{$tag}_{$name}'";
return "(isset(\$_smarty_tpl->tpl_vars[{$tagVar}]->value['{$property}']) ? \$_smarty_tpl->tpl_vars[{$tagVar}]->value['{$property}'] : null)";
}
}