Use $lang->hasVariants() instead of count( $lang->getVariants() ) > 1
[lhc/web/wiklou.git] / includes / api / ApiPageSet.php
index a32b288..ea2a85f 100644 (file)
@@ -1200,7 +1200,7 @@ class ApiPageSet extends ApiBase {
                                // Variants checking
                                global $wgContLang;
                                if ( $this->mConvertTitles &&
-                                       count( $wgContLang->getVariants() ) > 1 &&
+                                       $wgContLang->hasVariants() &&
                                        !$titleObj->exists()
                                ) {
                                        // Language::findVariantLink will modify titleText and titleObj into