diff --git a/src/ServiceMap.php b/src/ServiceMap.php index 1c90359..a495570 100644 --- a/src/ServiceMap.php +++ b/src/ServiceMap.php @@ -74,7 +74,7 @@ public function getServiceClassFromNode(Node $node): ?string public function getComponentClassById(string $id): ?string { // Special case in which the component is already initialized - if (is_object($this->components[$id])) { + if (isset($this->components[$id]) && is_object($this->components[$id])) { return get_class($this->components[$id]); }