Skip to content

Commit

Permalink
fix(twig.generator): fix call() fn
Browse files Browse the repository at this point in the history
  • Loading branch information
adhocore committed Sep 20, 2018
1 parent 92230ae commit 72bc7fa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Generator/TwigGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}));
}

Expand Down

0 comments on commit 72bc7fa

Please sign in to comment.