Skip to content

Commit

Permalink
Update filters.php
Browse files Browse the repository at this point in the history
fix null error
  • Loading branch information
alnutile committed Jul 28, 2014
1 parent da77f5a commit 6bb8871
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions app/filters.php
Expand Up @@ -14,8 +14,7 @@
App::before(function($request)
{
$settings = Setting::find(1);
(null === $settings) ? $settings = true : false;
if($settings->maintenance_mode && Auth::guest() && Request::path() != 'login') {
if($settings !== null && $settings->maintenance_mode && Auth::guest() && Request::path() != 'login') {
return View::make('layouts.maintenance', compact('settings'));
}
});
Expand Down

0 comments on commit 6bb8871

Please sign in to comment.