diff --git a/libraries/src/Application/CMSApplication.php b/libraries/src/Application/CMSApplication.php index f049e8d7d0561..2c8c61a9101e7 100644 --- a/libraries/src/Application/CMSApplication.php +++ b/libraries/src/Application/CMSApplication.php @@ -303,7 +303,7 @@ public function execute() $this->compress(); // Trigger the onAfterCompress event. - $this->triggerEvent('onAfterCompress'); + $this->dispatchEvent('onAfterCompress'); } } catch (\Throwable $throwable) { /** @var ErrorEvent $event */ @@ -317,19 +317,19 @@ public function execute() ); // Trigger the onError event. - $this->triggerEvent('onError', $event); + $this->dispatchEvent('onError', $event); ExceptionHandler::handleException($event->getError()); } // Trigger the onBeforeRespond event. - $this->getDispatcher()->dispatch('onBeforeRespond'); + $this->dispatchEvent('onBeforeRespond'); // Send the application response. $this->respond(); // Trigger the onAfterRespond event. - $this->getDispatcher()->dispatch('onAfterRespond'); + $this->dispatchEvent('onAfterRespond'); } /**