diff --git a/src/BaseEvent.php b/src/BaseEvent.php index 38b81c85..35182030 100644 --- a/src/BaseEvent.php +++ b/src/BaseEvent.php @@ -106,6 +106,7 @@ abstract class BaseEvent{ static::$handlers[$identifier] = $handler; if(!isset(static::$handlerPriority[(int) $priority])){ static::$handlerPriority[(int) $priority] = array(); + krsort(static::$handlerPriority); } static::$handlerPriority[(int) $priority][$identifier] = $handler; return true; @@ -132,4 +133,4 @@ abstract class BaseEvent{ } } -} \ No newline at end of file +}