This commit is contained in:
2021-04-20 11:48:56 +08:00
parent 723832722a
commit a8bef3dcf1
+4 -4
View File
@@ -116,7 +116,7 @@ class Node extends HttpService
} }
if (!empty($this->handler)) { if (!empty($this->handler)) {
$this->callback = Reduce::reduce(function () { $this->callback = Reduce::reduce(function () {
return call_user_func($this->handler, ...func_get_args()); return call_user_func($this->handler, func_get_args());
}, $this->annotation()); }, $this->annotation());
} }
return $this; return $this;
@@ -129,7 +129,7 @@ class Node extends HttpService
public function createDispatch(): Closure public function createDispatch(): Closure
{ {
return function () { return function () {
return call_user_func($this->handler, ...func_get_args()); return call_user_func($this->handler, func_get_args());
}; };
} }
@@ -532,9 +532,9 @@ class Node extends HttpService
{ {
try { try {
if ($this->handler instanceof Closure) { if ($this->handler instanceof Closure) {
return call_user_func($this->handler, ...func_get_args()); return call_user_func($this->handler, func_get_args());
} }
return $this->runWith($this->callback, ...func_get_args()); return $this->runWith($this->callback, func_get_args());
return $this->runFilter(...func_get_args()); return $this->runFilter(...func_get_args());
} catch (Throwable $throwable) { } catch (Throwable $throwable) {