Skip to content

Commit

Permalink
Merge pull request #190 from delyriand/fix/arguments-unpacking
Browse files Browse the repository at this point in the history
Argument unpacking to avoid error when call decorated function with multiple arguments
  • Loading branch information
maximehuran authored Sep 13, 2023
2 parents 0393453 + 282e04d commit 95a8172
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Routing/RequestContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public function __call(string $name, array $arguments)
{
$callback = [$this->decorated, $name];
if (\is_callable($callback)) {
return \call_user_func($callback, $arguments);
return \call_user_func($callback, ...$arguments);
}

throw new Exception(sprintf('Method %s not found for class "%s"', $name, \get_class($this->decorated)));
Expand Down

0 comments on commit 95a8172

Please sign in to comment.