Merge branch 'release/3.3'

This commit is contained in:
Dylan K. Taylor
2018-10-14 11:08:50 +01:00
6 changed files with 86 additions and 97 deletions

View File

@ -88,16 +88,19 @@ abstract class Event{
assert($handlerList !== null, "Called event should have a valid HandlerList");
++self::$eventCallDepth;
foreach(EventPriority::ALL as $priority){
$currentList = $handlerList;
while($currentList !== null){
foreach($currentList->getListenersByPriority($priority) as $registration){
$registration->callEvent($this);
}
try{
foreach(EventPriority::ALL as $priority){
$currentList = $handlerList;
while($currentList !== null){
foreach($currentList->getListenersByPriority($priority) as $registration){
$registration->callEvent($this);
}
$currentList = $currentList->getParent();
$currentList = $currentList->getParent();
}
}
}finally{
--self::$eventCallDepth;
}
--self::$eventCallDepth;
}
}