From 3e22b7405a1ebae4e5c2ea0f31be1756bdcdee14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Thu, 17 Dec 2020 10:17:27 +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/Middleware.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/HttpServer/Route/Middleware.php b/HttpServer/Route/Middleware.php index 577d57e1..2de7e953 100644 --- a/HttpServer/Route/Middleware.php +++ b/HttpServer/Route/Middleware.php @@ -78,6 +78,9 @@ class Middleware return; } foreach ($annotation as $item) { + if (empty($item) || !isset($item['attributes'])) { + continue; + } foreach ($item['attributes'] as $attribute) { if ($attribute instanceof Interceptor) { $node->addInterceptor($attribute->interceptor);