(bug 15479) action=login no longer sets wait parameter when result="Throttled"; regre...
[lhc/web/wiklou.git] / includes / StubObject.php
index 07db880..ec52e7f 100644 (file)
@@ -147,7 +147,7 @@ class StubUserLang extends StubObject {
 
                // if variant is explicitely selected, use it instead the one from wgUser
                // see bug #7605
-               if( $wgContLang->hasVariants() ){
+               if( $wgContLang->hasVariants() && in_array($code, $wgContLang->getVariants()) ){
                        $variant = $wgContLang->getPreferredVariant();
                        if( $variant != $wgContLanguageCode )
                                $code = $variant;