From 0ac089cf8cea4c3d51f76666e7af15f5c32d6186 Mon Sep 17 00:00:00 2001 From: dafriend Date: Thu, 14 Nov 2019 21:53:54 -0600 Subject: [PATCH] Fix issue #2391 CodeIgniter::display404errors() ``CodeIgniter::display404errors`` calls Call to ``CodeIgniter::gatherOutput()`` causing a TypeError exception when ``$this->cachePage();`` is called with a null argument. Fixed by instantiating a Cache config object in ``display404errors()`` and passing it to ``gatherOutput()`` --- system/CodeIgniter.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/system/CodeIgniter.php b/system/CodeIgniter.php index ae6fe77612a3..92e60e3fc38c 100644 --- a/system/CodeIgniter.php +++ b/system/CodeIgniter.php @@ -883,7 +883,8 @@ protected function display404errors(PageNotFoundException $e) $this->runController($controller); } - $this->gatherOutput(); + $cacheConfig = new Cache(); + $this->gatherOutput($cacheConfig); $this->sendResponse(); return;