mirror of
https://github.com/yiisoft/yii2.git
synced 2025-08-26 14:26:54 +08:00
Adjusted conditions nesting in yii\base\Event
This commit is contained in:

committed by
Alexander Makarov

parent
b32db9fb28
commit
29b5f33722
@ -211,7 +211,10 @@ class Event extends Object
|
||||
);
|
||||
|
||||
foreach ($classes as $class) {
|
||||
if (!empty(self::$_events[$name][$class])) {
|
||||
if (empty(self::$_events[$name][$class])) {
|
||||
continue;
|
||||
}
|
||||
|
||||
foreach (self::$_events[$name][$class] as $handler) {
|
||||
$event->data = $handler[1];
|
||||
call_user_func($handler[0], $event);
|
||||
@ -221,5 +224,4 @@ class Event extends Object
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user