Fix: check if the session is set before using it
This commit is contained in:
parent
2847231376
commit
d9f632da26
@ -24,7 +24,7 @@ require_once models . 'Habit.php';
|
||||
|
||||
// Initialize router
|
||||
$router = new Router();
|
||||
if(!$_SESSION['user']) {
|
||||
if(!isset($_SESSION['user'])) {
|
||||
$router->add('/', 'HomeController@index');
|
||||
} else {
|
||||
$router->add('/', 'DashboardController@reroute', ['RequireAuth']);
|
||||
|
Loading…
Reference in New Issue
Block a user