From db0767a71e59e9d2dcef70e80245a894889e99a4 Mon Sep 17 00:00:00 2001 From: "Uwe.Tews" Date: Wed, 4 Nov 2009 17:54:00 +0000 Subject: [PATCH] - bugfix on complex indexed special Smarty variables --- change_log.txt | 1 + .../smarty_internal_compile_special_smarty_variable.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/change_log.txt b/change_log.txt index 810917b2..badf6470 100644 --- a/change_log.txt +++ b/change_log.txt @@ -1,5 +1,6 @@ 11/04/2009 - added typecasting support for template variables +- bugfix on complex indexed special Smarty variables 11/03/2009 - fixed parser error on objects with special smarty vars diff --git a/libs/sysplugins/smarty_internal_compile_special_smarty_variable.php b/libs/sysplugins/smarty_internal_compile_special_smarty_variable.php index 109a24af..aec37c8e 100644 --- a/libs/sysplugins/smarty_internal_compile_special_smarty_variable.php +++ b/libs/sysplugins/smarty_internal_compile_special_smarty_variable.php @@ -21,7 +21,7 @@ class Smarty_Internal_Compile_Special_Smarty_Variable extends Smarty_Internal_Co */ public function compile($args, $compiler) { - $_index = explode(',', str_replace(array('][', '[', ']'), array(',', '', ''), $args)); + $_index = explode(',', str_replace(array(']['), array(','), substr($args,1,strlen($args)-2))); $compiled_ref = ' '; switch (trim($_index[0], "'")) { case 'foreach':