Rename variable to avoid collisions
authorBrad Jorsch <bjorsch@wikimedia.org>
Mon, 17 Aug 2015 15:01:49 +0000 (11:01 -0400)
committerBrad Jorsch <bjorsch@wikimedia.org>
Mon, 17 Aug 2015 15:01:49 +0000 (11:01 -0400)
The overwriting of $status in one switch case looks like a likely cause
of T109193, so let's rename one of the two.

Bug: T109193
Change-Id: I373f0e01d349883c7735c8e6acf9d258900c166e

includes/specials/SpecialUserlogin.php

index 0b500f4..13957c3 100644 (file)
@@ -939,8 +939,8 @@ class LoginForm extends SpecialPage {
                global $wgMemc, $wgLang, $wgSecureLogin, $wgPasswordAttemptThrottle,
                        $wgInvalidPasswordReset;
 
-               $status = $this->authenticateUserData();
-               switch ( $status ) {
+               $authRes = $this->authenticateUserData();
+               switch ( $authRes ) {
                        case self::SUCCESS:
                                # We've verified now, update the real record
                                $user = $this->getUser();
@@ -1066,8 +1066,8 @@ class LoginForm extends SpecialPage {
 
                LoggerFactory::getInstance( 'authmanager' )->info( 'Login attempt', array(
                        'event' => 'login',
-                       'successful' => $status === self::SUCCESS,
-                       'status' => LoginForm::$statusCodes[$status],
+                       'successful' => $authRes === self::SUCCESS,
+                       'status' => LoginForm::$statusCodes[$authRes],
                ) );
        }