Using strict type check

parent 5163979a
...@@ -19,6 +19,8 @@ class PublicController extends BasePublicController ...@@ -19,6 +19,8 @@ class PublicController extends BasePublicController
*/ */
private $app; private $app;
private $disabledPage = false;
public function __construct(PageRepository $page, Application $app) public function __construct(PageRepository $page, Application $app)
{ {
parent::__construct(); parent::__construct();
...@@ -89,7 +91,7 @@ class PublicController extends BasePublicController ...@@ -89,7 +91,7 @@ class PublicController extends BasePublicController
*/ */
private function throw404IfNotFound($page) private function throw404IfNotFound($page)
{ {
if (is_null($page) || $page->status == 0) { if (null === $page || $page->status === $this->disabledPage) {
$this->app->abort('404'); $this->app->abort('404');
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment