From 78d89f8a7105d798d765fbaaafe8d7e4bcbfbe75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Tue, 20 Apr 2021 12:04:05 +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 | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/HttpServer/Route/Node.php b/HttpServer/Route/Node.php index 435c462f..e7a35616 100644 --- a/HttpServer/Route/Node.php +++ b/HttpServer/Route/Node.php @@ -534,9 +534,9 @@ class Node extends HttpService $dispatchParams = [\request()]; } if ($this->handler instanceof Closure) { - return call_user_func($this->handler, ...$dispatchParams); + return call_user_func($this->handler, $dispatchParams); } - return $this->runWith($this->callback, ...$dispatchParams); + return $this->runWith($this->callback, $dispatchParams); return $this->runFilter(...$dispatchParams); } catch (Throwable $throwable) { $this->addError($throwable, 'throwable'); @@ -558,12 +558,12 @@ class Node extends HttpService $filter = Snowflake::app()->get('filter'); $validator = $filter->check(get_class($this->handler[0]), $this->handler[1]); if (!($validator instanceof Validator)) { - return $this->runWith($this->callback, ...func_get_args()); + return $this->runWith($this->callback, func_get_args()); } if (!$validator->validation()) { return Json::to(5005, $validator->getError()); } - return $this->runWith($this->callback, ...func_get_args()); + return $this->runWith($this->callback, func_get_args()); } @@ -574,7 +574,6 @@ class Node extends HttpService private function runWith(): mixed { if (func_num_args() > 0) { - var_dump(...func_get_args()); return call_user_func($this->callback, ...func_get_args()); } else { return call_user_func($this->callback, \request());