From 0acba360d391c8312499e1d912da7af172255e12 Mon Sep 17 00:00:00 2001 From: "uwe.tews@googlemail.com" Date: Thu, 28 Oct 2010 20:11:01 +0000 Subject: [PATCH] - bugfix on compiling modifiers within $smarty special vars like {$smarty.post.{$foo|lower}} --- change_log.txt | 3 +++ .../smarty_internal_compile_private_special_variable.php | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/change_log.txt b/change_log.txt index 9ab445dc..84e8ea9b 100644 --- a/change_log.txt +++ b/change_log.txt @@ -1,3 +1,6 @@ +28/10/2010 +- bugfix on compiling modifiers within $smarty special vars like {$smarty.post.{$foo|lower}} + 27/10/2010 - bugfix default parameter values did not work for template functions included with {include} diff --git a/libs/sysplugins/smarty_internal_compile_private_special_variable.php b/libs/sysplugins/smarty_internal_compile_private_special_variable.php index 886d345f..2be898f0 100644 --- a/libs/sysplugins/smarty_internal_compile_private_special_variable.php +++ b/libs/sysplugins/smarty_internal_compile_private_special_variable.php @@ -22,7 +22,7 @@ class Smarty_Internal_Compile_Private_Special_Variable extends Smarty_Internal_C */ public function compile($args, $compiler) { - $_index = explode(',', str_replace(array(']['), array(','), substr($args, 1, strlen($args)-2))); + $_index = preg_split("/\]\[/",substr($args, 1, strlen($args)-2)); $compiled_ref = ' '; $variable = trim($_index[0], "'"); switch ($variable) {