- bugfix array_merge() parameter should be checked https://github.com/smarty-php/smarty/issues/350

This commit is contained in:
uwetews
2017-04-13 07:15:46 +02:00
parent fd95365bf3
commit 6d85c715f1
2 changed files with 9 additions and 3 deletions

View File

@@ -1,5 +1,7 @@
===== 3.1.32 - dev ===
13.4.2017
- bugfix array_merge() parameter should be checked https://github.com/smarty-php/smarty/issues/350
===== 3.1.31 ===== (14.12.2016)
23.11.2016
- move template object cache into static variables

View File

@@ -663,8 +663,12 @@ abstract class Smarty_Internal_TemplateCompilerBase
// if compiler function plugin call it now
if ($plugin_type == Smarty::PLUGIN_COMPILER) {
$new_args = array();
foreach ($args as $mixed) {
$new_args = array_merge($new_args, $mixed);
foreach ($args as $key => $mixed) {
if (is_array($mixed)) {
$new_args = array_merge($new_args, $mixed);
} else {
$new_args[ $key ] = $mixed;
}
}
return call_user_func_array($this->default_handler_plugins[ $plugin_type ][ $tag ][ 0 ],
array($new_args, $this));