From e1c724a1079c1e029f40d7a7c036ca968e6959c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Thu, 4 Mar 2021 00:27:14 +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 | 1 + 1 file changed, 1 insertion(+) diff --git a/HttpServer/Route/Node.php b/HttpServer/Route/Node.php index bf8c434a..b8ea22c1 100644 --- a/HttpServer/Route/Node.php +++ b/HttpServer/Route/Node.php @@ -391,6 +391,7 @@ class Node extends HttpService */ public function addMiddleware(Closure|string|array $class): static { + if (empty($class)) return $this; if (is_string($class)) { $class = $this->resolve_aop($class); if ($class === null) {