From b057b8b4d08a009848b8205fb135a3a72fd806dc Mon Sep 17 00:00:00 2001 From: Mark Hewitt Date: Wed, 28 Mar 2018 13:58:30 -0400 Subject: [PATCH 1/2] Error pages are now displayed in place, as opposed to redirecting the user --- application/Core/Application.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/application/Core/Application.php b/application/Core/Application.php index b5235bb..4e21326 100644 --- a/application/Core/Application.php +++ b/application/Core/Application.php @@ -53,11 +53,13 @@ public function __construct() // no action defined: call the default index() method of a selected controller $this->url_controller->index(); } else { - header('location: ' . URL . 'error'); + $page = new \Mini\Controller\ErrorController(); + $page->errorPage(); } } } else { - header('location: ' . URL . 'error'); + $page = new \Mini\Controller\ErrorController(); + $page->errorPage(); } } From b58aef019b6f052fd8c45723c534268b540c863a Mon Sep 17 00:00:00 2001 From: Mark Hewitt Date: Wed, 28 Mar 2018 14:00:19 -0400 Subject: [PATCH 2/2] Fixed method call from errorPage to index --- application/Core/Application.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/application/Core/Application.php b/application/Core/Application.php index 4e21326..083674c 100644 --- a/application/Core/Application.php +++ b/application/Core/Application.php @@ -54,12 +54,12 @@ public function __construct() $this->url_controller->index(); } else { $page = new \Mini\Controller\ErrorController(); - $page->errorPage(); + $page->index(); } } } else { $page = new \Mini\Controller\ErrorController(); - $page->errorPage(); + $page->index(); } }