From 819cdd835ee810cb77f01d6895e67171ec6ee773 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Tue, 20 Apr 2021 15:13:20 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- HttpServer/Route/Node.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/HttpServer/Route/Node.php b/HttpServer/Route/Node.php index a91d5f16..f08ee4eb 100644 --- a/HttpServer/Route/Node.php +++ b/HttpServer/Route/Node.php @@ -522,7 +522,7 @@ class Node extends HttpService if (empty($this->callback)) { 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 { try { - $dispatchParams = func_get_args(); - if (empty($dispatchParams)) $dispatchParams = [\request(), \response()]; + $dispatchParams = [\request()]; if ($this->handler instanceof Closure) { return call_user_func($this->handler, ...$dispatchParams); }