Skip to content

Commit

Permalink
FIX Don't use call_user_func in __call()
Browse files Browse the repository at this point in the history
These would cause problems if ViewLayerData hits them with a method that
doesn't exist.
  • Loading branch information
GuySartorelli committed Dec 3, 2024
1 parent 6cd38d2 commit a69fc32
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Core/Injector/AopProxyService.php
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down
2 changes: 1 addition & 1 deletion src/View/Parsers/HTMLValue.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit a69fc32

Please sign in to comment.