Skip to content

Commit

Permalink
Solved issue smarty-php#342
Browse files Browse the repository at this point in the history
Add checking type of `args` when making `new_args` for compiler.
  • Loading branch information
vuongxuongminh committed Mar 16, 2017
1 parent c7d42e4 commit 7da18ba
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion libs/sysplugins/smarty_internal_templatecompilerbase.php
Original file line number Diff line number Diff line change
Expand Up @@ -664,7 +664,11 @@ private function compileTag2($tag, $args, $parameter)
if ($plugin_type == Smarty::PLUGIN_COMPILER) {
$new_args = array();
foreach ($args as $mixed) {
$new_args = array_merge($new_args, $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));
Expand Down

0 comments on commit 7da18ba

Please sign in to comment.