Demon has submitted this change and it was merged.

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(-)

Approvals:
  Demon: Verified; Looks good to me, approved



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: merged
Gerrit-Change-Id: Iac992bc88171eac878f6b38879ffd18acee3f75d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MWSearch
Gerrit-Branch: master
Gerrit-Owner: Demon <[email protected]>
Gerrit-Reviewer: Demon <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to