fix passing arguments to call_user_func_array() on PHP 8
This commit is contained in:
parent
12706c4ff0
commit
a55ce7c8bb
@ -86,7 +86,13 @@ class GetAttrNode extends Node
|
||||
throw new \RuntimeException(sprintf('Unable to call method "%s" of object "%s".', $this->nodes['attribute']->attributes['value'], \get_class($obj)));
|
||||
}
|
||||
|
||||
return \call_user_func_array($toCall, $this->nodes['arguments']->evaluate($functions, $values));
|
||||
$arguments = $this->nodes['arguments']->evaluate($functions, $values);
|
||||
|
||||
if (\PHP_VERSION_ID >= 80000) {
|
||||
$arguments = array_values($arguments);
|
||||
}
|
||||
|
||||
return \call_user_func_array($toCall, $arguments);
|
||||
|
||||
case self::ARRAY_CALL:
|
||||
$array = $this->nodes['node']->evaluate($functions, $values);
|
||||
|
Reference in New Issue
Block a user