Skip to content

Commit

Permalink
optimize check has events in DomainEventPublisher::postFlush()
Browse files Browse the repository at this point in the history
  • Loading branch information
peter-gribanov committed Aug 17, 2017
1 parent 9f2cdd2 commit 1c47c35
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Event/Listener/DomainEventPublisher.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 1c47c35

Please sign in to comment.