mirror of
https://github.com/smarty-php/smarty.git
synced 2026-05-04 11:44:16 +02:00
- bugfix modifier on plugins like {plugin|modifier ... } did fail when the plugin does return an array https://github.com/smarty-php/smarty/issues/228
This commit is contained in:
@@ -47,8 +47,6 @@ class Smarty_Internal_Compile_Private_Function_Plugin extends Smarty_Internal_Co
|
||||
{
|
||||
// check and get attributes
|
||||
$_attr = $this->getAttributes($compiler, $args);
|
||||
//Does tag create output
|
||||
$compiler->has_output = isset($_attr[ 'assign' ]) ? false : true;
|
||||
|
||||
unset($_attr[ 'nocache' ]);
|
||||
// convert attributes into parameter array string
|
||||
@@ -62,8 +60,15 @@ class Smarty_Internal_Compile_Private_Function_Plugin extends Smarty_Internal_Co
|
||||
}
|
||||
$_params = 'array(' . implode(",", $_paramsArray) . ')';
|
||||
// compile code
|
||||
$output = "<?php echo {$function}({$_params},\$_smarty_tpl);?>\n";
|
||||
|
||||
$output = "{$function}({$_params},\$_smarty_tpl)";
|
||||
if (!empty($parameter[ 'modifierlist' ])) {
|
||||
$output = $compiler->compileTag('private_modifier', array(),
|
||||
array('modifierlist' => $parameter[ 'modifierlist' ],
|
||||
'value' => $output));
|
||||
}
|
||||
//Does tag create output
|
||||
$compiler->has_output = isset($_attr[ 'assign' ]) ? false : true;
|
||||
$output = "<?php " . ($compiler->has_output ? "echo " : '') . "{$output};?>\n";
|
||||
return $output;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user