This commit is contained in:
2021-04-20 15:13:20 +08:00
parent 0354949c0b
commit 819cdd835e
+2 -3
View File
@@ -522,7 +522,7 @@ class Node extends HttpService
if (empty($this->callback)) { if (empty($this->callback)) {
return Json::to(404, $this->errorMsg()); return Json::to(404, $this->errorMsg());
} }
return $this->httpFilter(...func_get_args()); return $this->httpFilter();
} }
@@ -533,8 +533,7 @@ class Node extends HttpService
private function httpFilter(): mixed private function httpFilter(): mixed
{ {
try { try {
$dispatchParams = func_get_args(); $dispatchParams = [\request()];
if (empty($dispatchParams)) $dispatchParams = [\request(), \response()];
if ($this->handler instanceof Closure) { if ($this->handler instanceof Closure) {
return call_user_func($this->handler, ...$dispatchParams); return call_user_func($this->handler, ...$dispatchParams);
} }