Skip to content

Commit

Permalink
Check page status if page exists.
Browse files Browse the repository at this point in the history
Signed-off-by: Mariusz Fik <mariusz@fidano.pl>
  • Loading branch information
Fisiu committed Jun 8, 2018
1 parent 7a91d62 commit 7b9eed2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Modules/Page/Http/Controllers/PublicController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}
}
Expand Down

0 comments on commit 7b9eed2

Please sign in to comment.