From add59693c11a931934fff07f721d0de5e5a936f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Tue, 8 Jun 2021 11:45:18 +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 | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/HttpServer/Route/Node.php b/HttpServer/Route/Node.php index b0f98f93..7bc4c503 100644 --- a/HttpServer/Route/Node.php +++ b/HttpServer/Route/Node.php @@ -495,10 +495,11 @@ class Node extends HttpService public function addMiddleware(Closure|array $class): static { if (empty($class)) return $this; + + if ($this->path == 'xiaqi') { + var_dump($this->middleware); + } foreach ($class as $closure) { - if ($this->path == 'xiaqi') { - var_dump(in_array($closure, $this->middleware)); - } if (in_array($closure, $this->middleware)) { continue; }