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) {