From 712e5bc3eb5f2a7257749c106a349f0af86ff2bb Mon Sep 17 00:00:00 2001 From: "as2252258@163.com" Date: Mon, 3 May 2021 13:51:22 +0800 Subject: [PATCH] modify --- HttpServer/Route/Node.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/HttpServer/Route/Node.php b/HttpServer/Route/Node.php index 3ab6fbc5..23911d3a 100644 --- a/HttpServer/Route/Node.php +++ b/HttpServer/Route/Node.php @@ -126,10 +126,9 @@ class Node extends HttpService if (empty($dispatchParam)) { $dispatchParam = [\request()]; } -// if ($this->handler instanceof Closure) { -// return call_user_func($this->handler, ...$dispatchParam); -// } - return call_user_func($this->handler, ...$dispatchParam); + if ($this->handler instanceof Closure) { + return call_user_func($this->handler, ...$dispatchParam); + } return \aop($this->handler, $dispatchParam); }; }