From b46b5f201c74b579d0acd9717d17d555f50db378 Mon Sep 17 00:00:00 2001 From: Lonnie Ezell Date: Thu, 6 Jul 2017 15:22:20 -0500 Subject: [PATCH] Add pre system hook. Fixes #555 --- system/CodeIgniter.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/system/CodeIgniter.php b/system/CodeIgniter.php index 9caf6d238d8c..32e8356282bb 100644 --- a/system/CodeIgniter.php +++ b/system/CodeIgniter.php @@ -189,13 +189,15 @@ public function run(RouteCollectionInterface $routes = null) $this->forceSecureAccess(); + $this->spoofRequestMethod(); + + Events::trigger('pre_system'); + // Check for a cached page. Execution will stop // if the page has been cached. $cacheConfig = new Cache(); $this->displayCache($cacheConfig); - $this->spoofRequestMethod(); - try { $this->handleRequest($routes, $cacheConfig); }