mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-03 09:54:27 +02:00
Fix default plugin handler
This commit is contained in:
@@ -1158,15 +1158,7 @@ class Template extends BaseCompiler {
|
|||||||
// the default plugin handler is a handler of last resort, it may also handle not specifically registered tags.
|
// the default plugin handler is a handler of last resort, it may also handle not specifically registered tags.
|
||||||
if ($callback = $this->getPluginFromDefaultHandler($base_tag, Smarty::PLUGIN_COMPILER)) {
|
if ($callback = $this->getPluginFromDefaultHandler($base_tag, Smarty::PLUGIN_COMPILER)) {
|
||||||
$tagCompiler = new \Smarty\Compile\Tag\BCPluginWrapper($callback);
|
$tagCompiler = new \Smarty\Compile\Tag\BCPluginWrapper($callback);
|
||||||
$new_args = [];
|
return $tagCompiler->compile($args, $this, $parameter);
|
||||||
foreach ($args as $key => $mixed) {
|
|
||||||
if (is_array($mixed)) {
|
|
||||||
$new_args = array_merge($new_args, $mixed);
|
|
||||||
} else {
|
|
||||||
$new_args[$key] = $mixed;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return $tagCompiler->compile($new_args, $this, $parameter);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->getPluginFromDefaultHandler($base_tag, Smarty::PLUGIN_FUNCTION)) {
|
if ($this->getPluginFromDefaultHandler($base_tag, Smarty::PLUGIN_FUNCTION)) {
|
||||||
|
Reference in New Issue
Block a user