summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--index.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/index.php b/index.php
index 9c87f9a40..04362ef16 100644
--- a/index.php
+++ b/index.php
@@ -147,7 +147,7 @@ if ($RCMAIL->task == 'login' && $RCMAIL->action == 'login') {
$error_code = RCMAIL::ERROR_INVALID_REQUEST;
}
else {
- $error_code = $auth['error'] ? $auth['error'] : $RCMAIL->login_error();
+ $error_code = is_numeric($auth['error']) ? $auth['error'] : $RCMAIL->login_error();
}
$error_labels = array(
@@ -157,7 +157,7 @@ if ($RCMAIL->task == 'login' && $RCMAIL->action == 'login') {
RCMAIL::ERROR_INVALID_HOST => 'invalidhost',
);
- $error_message = $error_labels[$error_code] ? $error_labels[$error_code] : 'loginfailed';
+ $error_message = !is_numeric($auth['error']) ? $auth['error'] : ($error_labels[$error_code] ?: 'loginfailed');
$OUTPUT->show_message($error_message, 'warning');