Demon has uploaded a new change for review.
https://gerrit.wikimedia.org/r/60731
Change subject: $it can also be a Status
......................................................................
$it can also be a Status
Change-Id: Iac992bc88171eac878f6b38879ffd18acee3f75d
---
M MWSearch_body.php
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MWSearch
refs/changes/31/60731/1
diff --git a/MWSearch_body.php b/MWSearch_body.php
index 3e8e915..303b745 100644
--- a/MWSearch_body.php
+++ b/MWSearch_body.php
@@ -30,7 +30,7 @@
static function prefixSearch( $ns, $search, $limit, &$results ) {
$it = LuceneSearchSet::newFromQuery( 'prefix', $search, $ns,
$limit, 0 );
$results = array();
- if( $it ) { // $it can be null
+ if( $it || $it instanceof Status ) { // $it can be null
while( $res = $it->next() ) {
$results[] =
$res->getTitle()->getPrefixedText();
}
--
To view, visit https://gerrit.wikimedia.org/r/60731
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Iac992bc88171eac878f6b38879ffd18acee3f75d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MWSearch
Gerrit-Branch: master
Gerrit-Owner: Demon <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits