- 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,4 +1,6 @@
===== 3.1.32 - dev === ===== 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) ===== 3.1.31 ===== (14.12.2016)
23.11.2016 23.11.2016

View File

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