- optimize {section} compiler for speed and size of compiled code

This commit is contained in:
Uwe Tews
2015-07-30 01:15:22 +02:00
parent aa6e2219ec
commit 1074090473

View File

@@ -434,7 +434,8 @@ class Smarty_Internal_Compile_Section extends Smarty_Internal_CompileBase
}
$property = strtolower($property);
$sectionVar = "'__section_{$name}'";
return "(isset(\$_smarty_tpl->tpl_vars[{$sectionVar}]->value['{$property}']) ? \$_smarty_tpl->tpl_vars[{$sectionVar}]->value['{$property}'] : null)";
//return "(isset(\$_smarty_tpl->tpl_vars[{$sectionVar}]->value['{$property}']) ? \$_smarty_tpl->tpl_vars[{$sectionVar}]->value['{$property}'] : null)";
return "\$_smarty_tpl->tpl_vars[{$sectionVar}]->value['{$property}']";
}
}