Do not exit the run method in case of a missing rev
authorDavid Causse <dcausse@wikimedia.org>
Mon, 19 Dec 2016 17:37:01 +0000 (18:37 +0100)
committerDavid Causse <dcausse@wikimedia.org>
Mon, 19 Dec 2016 18:02:30 +0000 (19:02 +0100)
We should ignore broken/missing titles and not stop the whole process.

Change-Id: Ib4acb739c28c5f3278430b43b6304af3a513085e

includes/api/ApiQuerySearch.php

index 349ec9d..05b693d 100644 (file)
@@ -171,7 +171,8 @@ class ApiQuerySearch extends ApiQueryGeneratorBase {
 
                        // Silently skip broken and missing titles
                        if ( $result->isBrokenTitle() || $result->isMissingRevision() ) {
-                               return null;
+                               $result = $matches->next();
+                               continue;
                        }
 
                        if ( $resultPageSet === null ) {