Skip to content

Commit 72bc7fa

Browse files
committed
fix(twig.generator): fix call() fn
1 parent 92230ae commit 72bc7fa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Generator/TwigGenerator.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -161,8 +161,8 @@ protected function initTwig()
161161
return \gmdate($f ?? 'Y-m-d H:i:s');
162162
}));
163163

164-
$this->twig->addFilter(new \Twig_SimpleFilter('call', function ($fn) {
165-
return $fn(\array_slice(\func_get_args(), 1));
164+
$this->twig->addFunction(new \Twig_Function('call', function ($fn) {
165+
return $fn(...\array_slice(\func_get_args(), 1));
166166
}));
167167
}
168168

0 commit comments

Comments
 (0)