From 5669bf329a5f7449d64c39ed17f5d17a16d457da Mon Sep 17 00:00:00 2001 From: =?utf8?q?Gerg=C5=91=20Tisza?= Date: Thu, 29 Oct 2015 17:13:37 -0700 Subject: [PATCH] Fix AbortLogin hook return value check Bug: T117027 Change-Id: Ia0a222058306bd7e3d1d090dca9976dee54dcc6d --- includes/specials/SpecialUserlogin.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/specials/SpecialUserlogin.php b/includes/specials/SpecialUserlogin.php index 6c6ba3b39a..c569b0da58 100644 --- a/includes/specials/SpecialUserlogin.php +++ b/includes/specials/SpecialUserlogin.php @@ -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; -- 2.20.1