jenkins-bot has submitted this change and it was merged.

Change subject: [search] Fix method call on null value
......................................................................


[search] Fix method call on null value

Seeing these pop up in the production logs. This can be null under
certain circumstances, so expect and handle it.

Change-Id: I25a355174e0ad93280eccffd4ec711a641d14bf3
---
M includes/specials/SpecialSearch.php
1 file changed, 2 insertions(+), 1 deletion(-)

Approvals:
  Smalyshev: Looks good to me, but someone else must approve
  MaxSem: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/specials/SpecialSearch.php 
b/includes/specials/SpecialSearch.php
index d6ce6a4..fd24521 100644
--- a/includes/specials/SpecialSearch.php
+++ b/includes/specials/SpecialSearch.php
@@ -387,7 +387,8 @@
                        $textMatches->free();
                }
 
-               $hasOtherResults = $textMatches->hasInterwikiResults( 
SearchResultSet::INLINE_RESULTS );
+               $hasOtherResults = $textMatches &&
+                       $textMatches->hasInterwikiResults( 
SearchResultSet::INLINE_RESULTS );
 
                if ( $num === 0 ) {
                        if ( $textStatus ) {

-- 
To view, visit https://gerrit.wikimedia.org/r/249673
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I25a355174e0ad93280eccffd4ec711a641d14bf3
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: EBernhardson <[email protected]>
Gerrit-Reviewer: DCausse <[email protected]>
Gerrit-Reviewer: MaxSem <[email protected]>
Gerrit-Reviewer: Smalyshev <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to