From 23995df1afc931fae20567acdf47a6df335f4763 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Tue, 20 Apr 2021 12:17:08 +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, 1 insertion(+), 4 deletions(-) diff --git a/HttpServer/Route/Node.php b/HttpServer/Route/Node.php index 424eb707..7491fcdc 100644 --- a/HttpServer/Route/Node.php +++ b/HttpServer/Route/Node.php @@ -528,13 +528,10 @@ class Node extends HttpService { try { $dispatchParams = func_get_args(); - if (empty($dispatchParams)) { - $dispatchParams = [\request()]; - } + if (empty($dispatchParams)) $dispatchParams = [\request(), \response()]; if ($this->handler instanceof Closure) { return call_user_func($this->handler, ...$dispatchParams); } - $validator = $this->getValidator(); if (!($validator instanceof Validator)) { return call_user_func($this->callback, ...$dispatchParams);