fix compatibility for php < 5.5
This commit is contained in:
parent
7c31b9fff0
commit
21ac0a5fd9
@ -14,7 +14,7 @@ Router\before(function($action) {
|
|||||||
// Select the requested database either from post param database or from the
|
// Select the requested database either from post param database or from the
|
||||||
// session variable. If it fails, logout to destroy session and
|
// session variable. If it fails, logout to destroy session and
|
||||||
// 'remember me' cookie
|
// 'remember me' cookie
|
||||||
if (! empty(Request\value('database')) && ! Model\Database\select(Request\value('database'))) {
|
if (! is_null(Request\value('database')) && ! Model\Database\select(Request\value('database'))) {
|
||||||
Model\User\logout();
|
Model\User\logout();
|
||||||
Response\redirect('?action=login');
|
Response\redirect('?action=login');
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user