mirror of
https://github.com/smarty-php/smarty.git
synced 2025-10-20 16:05:20 +02:00
- new tag {make_nocache} read NEW_FEATURES.txt https://github.com/smarty-php/smarty/issues/110
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user