mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-03 18:04:26 +02:00
Fix testRegisterCompilerFunction by parsing argument correctly.
This commit is contained in:
@@ -6,6 +6,14 @@ use Smarty\Compile\Base;
|
||||
|
||||
class BCPluginWrapper extends Base {
|
||||
|
||||
/**
|
||||
* Attribute definition: Overwrites base class.
|
||||
*
|
||||
* @var array
|
||||
* @see Smarty_Internal_CompileBase
|
||||
*/
|
||||
public $optional_attributes = array('_any');
|
||||
|
||||
private $callback;
|
||||
|
||||
public function __construct($callback, bool $cacheable = true) {
|
||||
@@ -17,6 +25,6 @@ class BCPluginWrapper extends Base {
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function compile($args, \Smarty\Compiler\Template $compiler, $parameter = [], $tag = null, $function = null) {
|
||||
return call_user_func($this->callback, $args, $compiler->getSmarty());
|
||||
return call_user_func($this->callback, $this->getAttributes($compiler, $args), $compiler->getSmarty());
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user