Skip to content

Commit

Permalink
Using strict type check
Browse files Browse the repository at this point in the history
  • Loading branch information
nWidart committed Jun 21, 2018
1 parent 5163979 commit 5465031
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Modules/Page/Http/Controllers/PublicController.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ class PublicController extends BasePublicController
*/
private $app;

private $disabledPage = false;

public function __construct(PageRepository $page, Application $app)
{
parent::__construct();
Expand Down Expand Up @@ -89,7 +91,7 @@ private function getTemplateForPage($page)
*/
private function throw404IfNotFound($page)
{
if (is_null($page) || $page->status == 0) {
if (null === $page || $page->status === $this->disabledPage) {
$this->app->abort('404');
}
}
Expand Down

0 comments on commit 5465031

Please sign in to comment.