- new tag {make_nocache} read NEW_FEATURES.txt https://github.com/smarty-php/smarty/issues/110

This commit is contained in:
uwetews
2016-02-14 02:54:38 +01:00
parent 3756588858
commit 0f7f0d87b6
16 changed files with 1038 additions and 859 deletions

View File

@@ -45,13 +45,13 @@ class Smarty_Internal_Runtime_Foreach
if (isset($tpl->tpl_vars[ $key ])) {
$saveVars[ $key ] = $tpl->tpl_vars[ $key ];
}
$tpl->tpl_vars[ $key ] = new Smarty_Variable();
$tpl->tpl_vars[ $key ] = new Smarty_Variable(null, $tpl->isRenderingCache);
}
if (!is_array($from) && !is_object($from)) {
settype($from, 'array');
}
$total = $needTotal ? $this->count($from) : 1;
$tpl->tpl_vars[ $item ] = new Smarty_Variable();
$tpl->tpl_vars[ $item ] = new Smarty_Variable(null, $tpl->isRenderingCache);
if ($needTotal) {
$tpl->tpl_vars[ $item ]->total = $total;
}