From: Platonides Date: Tue, 27 Jul 2010 18:52:19 +0000 (+0000) Subject: $wgMemc at line 563 was only the global if $wgPasswordAttemptThrottle was an array X-Git-Tag: 1.31.0-rc.0~35882 X-Git-Url: http://git.cyclocoop.org/clavettes/images/siteon3.jpg?a=commitdiff_plain;h=7d271aca4751da09bd818d4f27952a4f991288c1;p=lhc%2Fweb%2Fwiklou.git $wgMemc at line 563 was only the global if $wgPasswordAttemptThrottle was an array Aren't globals funny? --- diff --git a/includes/specials/SpecialUserlogin.php b/includes/specials/SpecialUserlogin.php index c2f42799ea..4c38583f97 100644 --- a/includes/specials/SpecialUserlogin.php +++ b/includes/specials/SpecialUserlogin.php @@ -429,7 +429,8 @@ class LoginForm { * creation. */ public function authenticateUserData() { - global $wgUser, $wgAuth; + global $wgUser, $wgAuth, $wgMemc; + if ( $this->mName == '' ) { return self::NO_NAME; } @@ -457,7 +458,6 @@ class LoginForm { $count = $wgPasswordAttemptThrottle['count']; $period = $wgPasswordAttemptThrottle['seconds']; - global $wgMemc; $throttleCount = $wgMemc->get( $throttleKey ); if ( !$throttleCount ) { $wgMemc->add( $throttleKey, 1, $period ); // start counter