From ce6e38a27efdad45a9cf5c5198e292fadf6ef254 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=91=E6=9E=97?= Date: Tue, 1 Mar 2022 16:26:26 +0800 Subject: [PATCH] modify plugin name --- Container.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Container.php b/Container.php index 8475e1a..6897b8e 100644 --- a/Container.php +++ b/Container.php @@ -199,7 +199,11 @@ class Container implements ContainerInterface */ public function propertyInject(ReflectionClass $reflect, $object): mixed { - $properties = TargetManager::get($reflect->getName())->getPropertyAttribute(); + $properties = TargetManager::get($reflect->getName()); + if (is_null($properties)) { + return $object; + } + $properties = $properties->getPropertyAttribute(); foreach ($properties as $property) { $attributes = $property->getAttributes(); foreach ($attributes as $attribute) {