EventDispatcher uses only the return value of the last one listener, refs #9703
parent
25b2748101
commit
360966dcdf
|
@ -156,8 +156,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)) {
|
||||||
|
@ -273,6 +274,8 @@ class EventDispatcher
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$returnMax = max($returnMax, $return);
|
||||||
|
|
||||||
if ($event->isPropagationStopped()) {
|
if ($event->isPropagationStopped()) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -280,7 +283,7 @@ class EventDispatcher
|
||||||
|
|
||||||
$this->popEvent();
|
$this->popEvent();
|
||||||
|
|
||||||
return $return;
|
return $returnMax;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function executeTty($exec)
|
protected function executeTty($exec)
|
||||||
|
|
Loading…
Reference in New Issue