fix compatibility for php < 5.5

This commit is contained in:
Mathias Kresin 2015-01-18 18:40:00 +01:00
parent 7c31b9fff0
commit 21ac0a5fd9

View File

@ -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');
} }