diff --git a/src/Event/Listener/DomainEventPublisher.php b/src/Event/Listener/DomainEventPublisher.php index 5c64a26..b7a47f5 100644 --- a/src/Event/Listener/DomainEventPublisher.php +++ b/src/Event/Listener/DomainEventPublisher.php @@ -90,7 +90,7 @@ public function postFlush(PostFlushEventArgs $args) // flush only if has domain events // it necessary for fix recursive handle flush - if ($events) { + if (!empty($events)) { foreach ($events as $event) { $this->bus->publish($event); }