From fc5cf3981d4e0584dfb24c2de30571810b8b5dfc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Wed, 3 Mar 2021 23:46:05 +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 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/HttpServer/Route/Middleware.php b/HttpServer/Route/Middleware.php index 9e08b0b4..2057d2ab 100644 --- a/HttpServer/Route/Middleware.php +++ b/HttpServer/Route/Middleware.php @@ -72,8 +72,8 @@ class Middleware } [$controller, $action] = $node->handler; $attributes = Snowflake::app()->getAttributes(); - $annotation = $attributes->getMethods($controller, $action); - if (count($annotation) < 1) { + $annotation = $attributes->getMethods(get_class($controller), $action); + if (empty($annotation)) { return; } foreach ($annotation as $attribute) {