1
0
Fork 0

Merge remote-tracking branch 'Sweetchuck/i9703-event-dispatcher-last-winner'

pull/9735/head
Jordi Boggiano 2021-02-23 15:25:57 +01:00
commit 2597e195ef
No known key found for this signature in database
GPG Key ID: 7BBD42C429EC80BC
1 changed files with 5 additions and 2 deletions

View File

@ -157,8 +157,9 @@ class EventDispatcher
$this->pushEvent($event); $this->pushEvent($event);
$return = 0; $returnMax = 0;
foreach ($listeners as $callable) { foreach ($listeners as $callable) {
$return = 0;
$this->ensureBinDirIsInPath(); $this->ensureBinDirIsInPath();
if (!is_string($callable)) { if (!is_string($callable)) {
@ -287,6 +288,8 @@ class EventDispatcher
} }
} }
$returnMax = max($returnMax, $return);
if ($event->isPropagationStopped()) { if ($event->isPropagationStopped()) {
break; break;
} }
@ -294,7 +297,7 @@ class EventDispatcher
$this->popEvent(); $this->popEvent();
return $return; return $returnMax;
} }
protected function executeTty($exec) protected function executeTty($exec)