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
(cherry picked from commit 9250e72a6c4d187f1f3a35f486d35bb8b6317488)
---
M includes/specials/SpecialSearch.php
1 file changed, 2 insertions(+), 1 deletion(-)
Approvals:
Gergő Tisza: 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/249899
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I25a355174e0ad93280eccffd4ec711a641d14bf3
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.27.0-wmf.4
Gerrit-Owner: Ori.livneh <[email protected]>
Gerrit-Reviewer: EBernhardson <[email protected]>
Gerrit-Reviewer: Gergő Tisza <[email protected]>
Gerrit-Reviewer: Ori.livneh <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits