$wgMemc at line 563 was only the global if $wgPasswordAttemptThrottle was an array
authorPlatonides <platonides@users.mediawiki.org>
Tue, 27 Jul 2010 18:52:19 +0000 (18:52 +0000)
committerPlatonides <platonides@users.mediawiki.org>
Tue, 27 Jul 2010 18:52:19 +0000 (18:52 +0000)
Aren't globals funny?

includes/specials/SpecialUserlogin.php

index c2f4279..4c38583 100644 (file)
@@ -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