Merge "Fix documentation of mw.loader.getState"
[lhc/web/wiklou.git] / includes / api / ApiQuerySearch.php
index c6999df..51f799a 100644 (file)
@@ -206,7 +206,7 @@ class ApiQuerySearch extends ApiQueryGeneratorBase {
                $hasInterwikiResults = false;
                $totalhits = null;
                if ( $interwiki && $resultPageSet === null && $matches->hasInterwikiResults() ) {
-                       foreach( $matches->getInterwikiResults() as $matches ) {
+                       foreach ( $matches->getInterwikiResults() as $matches ) {
                                $matches = $matches->getInterwikiResults();
                                $hasInterwikiResults = true;
 
@@ -332,7 +332,7 @@ class ApiQuerySearch extends ApiQueryGeneratorBase {
                );
 
                $alternatives = SearchEngine::getSearchTypes();
-               if ( count( $alternatives ) > 1 ) {
+               if ( count( $alternatives ) > 0 ) {
                        if ( $alternatives[0] === null ) {
                                $alternatives[0] = self::BACKEND_NULL_PARAM;
                        }