Merge "SpecialAllMessages: Use cached getHtmlCode() instead of wfBCP47()"
[lhc/web/wiklou.git] / includes / specials / SpecialUserlogin.php
index 6c6ba3b..c569b0d 100644 (file)
@@ -784,7 +784,7 @@ class LoginForm extends SpecialPage {
                // Give general extensions, such as a captcha, a chance to abort logins
                $abort = self::ABORTED;
                if ( !Hooks::run( 'AbortLogin', array( $u, $this->mPassword, &$abort, &$msg ) ) ) {
-                       if ( !in_array( $abort, self::$statusCodes, true ) ) {
+                       if ( !in_array( $abort, array_keys( self::$statusCodes ), true ) ) {
                                throw new Exception( 'Invalid status code returned from AbortLogin hook: ' . $abort );
                        }
                        $this->mAbortLoginErrorMsg = $msg;