From 2c5c3caa821414a1ba881362c499d169d1ab14ea Mon Sep 17 00:00:00 2001 From: Roan Kattouw Date: Wed, 9 Nov 2011 17:20:05 +0000 Subject: [PATCH] (bug 32256) API list=search stops at first invalid result. Thanks to Lupo for finding the cause of the bug: in the code path for invalid titles, the iterator wasn't moved to the next result, so the loop kept processing the same result until it hit the limit. --- includes/api/ApiQuerySearch.php | 1 + 1 file changed, 1 insertion(+) diff --git a/includes/api/ApiQuerySearch.php b/includes/api/ApiQuerySearch.php index 8f7b725e3d..6f08e69d87 100644 --- a/includes/api/ApiQuerySearch.php +++ b/includes/api/ApiQuerySearch.php @@ -129,6 +129,7 @@ class ApiQuerySearch extends ApiQueryGeneratorBase { // Silently skip broken and missing titles if ( $result->isBrokenTitle() || $result->isMissingRevision() ) { + $result = $matches->next(); continue; } -- 2.20.1