diff --git a/libs/Smarty.class.php b/libs/Smarty.class.php index c7b0eb2f..eebfc9da 100644 --- a/libs/Smarty.class.php +++ b/libs/Smarty.class.php @@ -1521,23 +1521,25 @@ reques * @var string * @param array|null $map_array * @return string result of modifiers */ - function _run_mod_handler($_modifier_name, $_map_array, $_modifier_args) - { - $_func_name = $this->_plugins['modifier'][$_modifier_name][0]; - $_var = $_modifier_args[0]; + function _run_mod_handler() + { + $_args = func_get_args(); + list($_modifier_name, $_map_array) = array_splice($_args, 0, 2); + list($_func_name, $_tpl_file, $_tpl_line) = + $this->_plugins['modifier'][$_modifier_name]; + $_var = $_args[0]; if ($_map_array && is_array($_var)) { foreach ($_var as $_key => $_val) { - $_modifier_args[0] = $_val; - $_var[$_key] = call_user_func_array($_func_name, $_modifier_args); + $_args[0] = $_val; + $_var[$_key] = call_user_func_array($_func_name, $_args); } return $_var; } else { - return call_user_func_array($_func_name, $_modifier_args); + return call_user_func_array($_func_name, $_args); } } - /** * Remove starting and ending quotes from the string * diff --git a/libs/Smarty_Compiler.class.php b/libs/Smarty_Compiler.class.php index 29454ede..7c732efd 100644 --- a/libs/Smarty_Compiler.class.php +++ b/libs/Smarty_Compiler.class.php @@ -1689,7 +1689,6 @@ class Smarty_Compiler extends Smarty { } } - /** * add plugin *