From c6eb063f28267f65ae41a18bcd709fe18d503f09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Fri, 30 Oct 2020 01:18:24 +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 --- System/Annotation/Annotation.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/System/Annotation/Annotation.php b/System/Annotation/Annotation.php index a5567e33..01ede8d4 100644 --- a/System/Annotation/Annotation.php +++ b/System/Annotation/Annotation.php @@ -85,6 +85,9 @@ class Annotation extends BaseAnnotation foreach ($annotations as $annotation) { $comment = $function->getDocComment(); $methodName = $function->getName(); + if (!$comment) { + continue; + } preg_match('/@(' . $annotation . ')\((.*?)\)/', $comment, $events); if (!isset($events[1])) {