diff --git a/src/Core/Injector/AopProxyService.php b/src/Core/Injector/AopProxyService.php index b634ec734e0..5813563ca37 100644 --- a/src/Core/Injector/AopProxyService.php +++ b/src/Core/Injector/AopProxyService.php @@ -47,7 +47,7 @@ public function __call($method, $args) } if ($continue) { - $result = call_user_func_array([$this->proxied, $method], $args ?? []); + $result = $this->proxied->$method(...$args); if (isset($this->afterCall[$method])) { $methods = $this->afterCall[$method]; diff --git a/src/View/Parsers/HTMLValue.php b/src/View/Parsers/HTMLValue.php index f7accf29542..4484abec3b5 100644 --- a/src/View/Parsers/HTMLValue.php +++ b/src/View/Parsers/HTMLValue.php @@ -160,7 +160,7 @@ public function __call($method, $arguments) $doc = $this->getDocument(); if ($doc && method_exists($doc, $method ?? '')) { - return call_user_func_array([$doc, $method], $arguments ?? []); + return $doc->$method(...$arguments); } else { return parent::__call($method, $arguments); }