Simplify logic, test + cert

This commit is contained in:
Sam Georges 2014-06-17 20:11:31 +10:00
parent 4c31211153
commit 041c6e408f

View File

@ -125,11 +125,12 @@ class Controller extends BaseController
/*
* If the page was not found, render the 404 page - either provided by the theme or the built-in one.
*/
if (!$page && ($page = $this->router->findByUrl('/404')))
if (!$page) {
$this->setStatusCode(404);
if (!$page)
return Response::make(View::make('cms::404'), 404);
if (!$page = $this->router->findByUrl('/404'))
return Response::make(View::make('cms::404'), $this->statusCode);
}
$this->page = $page;