mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-04 18:34:27 +02:00
fix _run_mod_handler routine
This commit is contained in:
@@ -1521,23 +1521,25 @@ reques * @var string
|
|||||||
* @param array|null $map_array
|
* @param array|null $map_array
|
||||||
* @return string result of modifiers
|
* @return string result of modifiers
|
||||||
*/
|
*/
|
||||||
function _run_mod_handler($_modifier_name, $_map_array, $_modifier_args)
|
function _run_mod_handler()
|
||||||
{
|
{
|
||||||
$_func_name = $this->_plugins['modifier'][$_modifier_name][0];
|
$_args = func_get_args();
|
||||||
$_var = $_modifier_args[0];
|
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)) {
|
if ($_map_array && is_array($_var)) {
|
||||||
foreach ($_var as $_key => $_val) {
|
foreach ($_var as $_key => $_val) {
|
||||||
$_modifier_args[0] = $_val;
|
$_args[0] = $_val;
|
||||||
$_var[$_key] = call_user_func_array($_func_name, $_modifier_args);
|
$_var[$_key] = call_user_func_array($_func_name, $_args);
|
||||||
}
|
}
|
||||||
return $_var;
|
return $_var;
|
||||||
} else {
|
} 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
|
* Remove starting and ending quotes from the string
|
||||||
*
|
*
|
||||||
|
@@ -1689,7 +1689,6 @@ class Smarty_Compiler extends Smarty {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* add plugin
|
* add plugin
|
||||||
*
|
*
|
||||||
|
Reference in New Issue
Block a user