diff --git a/src/Events/DI/EventsExtension.php b/src/Events/DI/EventsExtension.php index 9edda33..b470188 100644 --- a/src/Events/DI/EventsExtension.php +++ b/src/Events/DI/EventsExtension.php @@ -383,7 +383,7 @@ private function optimizeListeners(DIContainerBuilder $builder) // find all subclasses and register the listener to all the classes dispatching them foreach ($builder->getDefinitions() as $def) { $class = $def->getClass(); - if (!empty($class)) { + if (!$class) { continue; // ignore unresolved classes }