From f7b9283b3e9eb51eb5ab2c061258337d29398469 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Mon, 22 Feb 2021 18:27:12 +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 --- Annotation/Annotation.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Annotation/Annotation.php b/Annotation/Annotation.php index 406debea..b663c37d 100644 --- a/Annotation/Annotation.php +++ b/Annotation/Annotation.php @@ -123,8 +123,8 @@ class Annotation extends Component return []; } - $constructor = $reflect->getConstructor()->getParameters(); - if (count($constructor) > 0) { + $constructor = $reflect->getConstructor(); + if (!empty($constructor) && count($constructor->getParameters()) > 0) { return []; }