From 5431a1de6cb029dbf6a1b5877e8b3fdd1f012b45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Tue, 23 Feb 2021 14:52:25 +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 85518949..f0144303 100644 --- a/HttpServer/Route/Node.php +++ b/HttpServer/Route/Node.php @@ -401,6 +401,7 @@ class Node extends HttpService */ public function addMiddleware(Closure|string|array $class) { + if (empty($class)) return; if (is_string($class)) { $class = Snowflake::createObject($class); if (!($class instanceof \HttpServer\IInterface\Middleware)) {