summaryrefslogtreecommitdiff
path: root/index.php
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2011-12-07 10:41:15 +0000
committeralecpl <alec@alec.pl>2011-12-07 10:41:15 +0000
commitb6da0b76afb5697685c35b8584631294cfc7b12f (patch)
treeda81d13466eccdfe287075e5a77ee37ab485a1bc /index.php
parent7e263ea2048721482c00db65d4511f00c4c7b1d4 (diff)
- Remove deprecated global $IMAP variable usage (#1488148)
Diffstat (limited to 'index.php')
-rw-r--r--index.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/index.php b/index.php
index 550ee0c33..6f761a4ee 100644
--- a/index.php
+++ b/index.php
@@ -129,7 +129,7 @@ if ($RCMAIL->task == 'login' && $RCMAIL->action == 'login') {
$OUTPUT->redirect($redir);
}
else {
- $error_code = is_object($IMAP) ? $IMAP->get_error_code() : -1;
+ $error_code = (isset($RCMAIL->imap) && is_object($RCMAIL->imap)) ? $RCMAIL->imap->get_error_code() : 1;
$OUTPUT->show_message($error_code < -1 ? 'imaperror' : (!$auth['valid'] ? 'invalidrequest' : 'loginfailed'), 'warning');
$RCMAIL->plugins->exec_hook('login_failed', array(