diff --git a/src/EventRegistry.php b/src/EventRegistry.php index a73b9a91b..7c4a5f64c 100644 --- a/src/EventRegistry.php +++ b/src/EventRegistry.php @@ -107,6 +107,10 @@ public function getAllActiveEvents(): array if (isset(self::$newEventsMap[$listenerKey])) { unset($listeners[$listenerKey]); } + + if (!isset(self::$eventsMap[$listenerKey])) { + self::$eventsMap[$listenerKey] = $this->getEventClassName($listenerKey); + } } $activeEvents = array_unique(array_merge($activeEvents, array_keys($listeners)));