mirror of
https://github.com/smarty-php/smarty.git
synced 2025-11-02 05:11:36 +01:00
- bugfix {counter} and {cycle} plugin assigned result to smarty variable not in local(template) scope
- bugfix templates containing just {strip} {/strip} tags did produce an error
This commit is contained in:
@@ -16,9 +16,10 @@
|
||||
* (Smarty online manual)
|
||||
* @param array parameters
|
||||
* @param Smarty
|
||||
* @param object $template template object
|
||||
* @return string|null
|
||||
*/
|
||||
function smarty_function_counter($params, $smarty)
|
||||
function smarty_function_counter($params, $smarty, $template)
|
||||
{
|
||||
static $counters = array();
|
||||
|
||||
@@ -42,7 +43,7 @@ function smarty_function_counter($params, $smarty)
|
||||
}
|
||||
|
||||
if (isset($counter['assign'])) {
|
||||
$smarty->assign($counter['assign'], $counter['count']);
|
||||
$template->assign($counter['assign'], $counter['count']);
|
||||
}
|
||||
|
||||
if (isset($params['print'])) {
|
||||
|
||||
Reference in New Issue
Block a user