From 7b9eed2696c1e19adfa063a8e714a4bf9b02b332 Mon Sep 17 00:00:00 2001 From: Mariusz Fik Date: Sun, 13 May 2018 20:27:11 +0200 Subject: [PATCH] Check page status if page exists. Signed-off-by: Mariusz Fik --- Modules/Page/Http/Controllers/PublicController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules/Page/Http/Controllers/PublicController.php b/Modules/Page/Http/Controllers/PublicController.php index 61ae6cc7b..430c5ea72 100644 --- a/Modules/Page/Http/Controllers/PublicController.php +++ b/Modules/Page/Http/Controllers/PublicController.php @@ -89,7 +89,7 @@ private function getTemplateForPage($page) */ private function throw404IfNotFound($page) { - if ($page->status == 0 || is_null($page)) { + if (is_null($page) || $page->status == 0) { $this->app->abort('404'); } }