Fixes "Undefined index: login_token".

Fixes https://github.com/Block8/PHPCI/issues/994.
This commit is contained in:
Adirelle 2015-05-26 08:46:49 +02:00 committed by Marco Vito Moscaritolo
parent 3a6008db53
commit d698b11673

View file

@ -44,7 +44,7 @@ class SessionController extends \PHPCI\Controller
if ($this->request->getMethod() == 'POST') {
$token = $this->getParam('token');
if ($token === null || $token !== $_SESSION['login_token']) {
if (!isset($token, $_SESSION['login_token']) || $token !== $_SESSION['login_token']) {
$isLoginFailure = true;
} else {
unset($_SESSION['login_token']);