From 72bc7fa1df69b0c065ff13de7c7ee616aac73caf Mon Sep 17 00:00:00 2001 From: Jitendra Adhikari Date: Thu, 20 Sep 2018 21:53:27 +0700 Subject: [PATCH] fix(twig.generator): fix call() fn --- src/Generator/TwigGenerator.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Generator/TwigGenerator.php b/src/Generator/TwigGenerator.php index 3b048a9..73f2642 100644 --- a/src/Generator/TwigGenerator.php +++ b/src/Generator/TwigGenerator.php @@ -161,8 +161,8 @@ protected function initTwig() return \gmdate($f ?? 'Y-m-d H:i:s'); })); - $this->twig->addFilter(new \Twig_SimpleFilter('call', function ($fn) { - return $fn(\array_slice(\func_get_args(), 1)); + $this->twig->addFunction(new \Twig_Function('call', function ($fn) { + return $fn(...\array_slice(\func_get_args(), 1)); })); }