diff --git a/framework/yii/base/Controller.php b/framework/yii/base/Controller.php index c0c5f2f..2f77b8e 100644 --- a/framework/yii/base/Controller.php +++ b/framework/yii/base/Controller.php @@ -115,7 +115,7 @@ class Controller extends Component $this->action = $action; $result = null; $event = new ActionEvent($action); - $this->trigger(Application::EVENT_BEFORE_ACTION, $event); + Yii::$app->trigger(Application::EVENT_BEFORE_ACTION, $event); if ($event->isValid && $this->module->beforeAction($action) && $this->beforeAction($action)) { $result = $action->runWithParams($params); $this->afterAction($action, $result);