From 542e5cbb561c0efac9090d51399f60485d58007f Mon Sep 17 00:00:00 2001 From: "as2252258@163.com" Date: Thu, 8 Apr 2021 01:48:53 +0800 Subject: [PATCH] modify --- Annotation/Loader.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Annotation/Loader.php b/Annotation/Loader.php index e099b96f..a8a0ef50 100644 --- a/Annotation/Loader.php +++ b/Annotation/Loader.php @@ -159,7 +159,7 @@ class Loader extends BaseObject } $replace = Snowflake::getDi()->getReflect($this->explodeFileName($path, $namespace)); - if (!$replace->getAttributes(Target::class)) { + if (empty($replace) || !$replace->getAttributes(Target::class)) { return; } $this->appendFileToDirectory($path->getRealPath(), $replace->getName());