From 9250e72a6c4d187f1f3a35f486d35bb8b6317488 Mon Sep 17 00:00:00 2001 From: Erik Bernhardson Date: Wed, 28 Oct 2015 18:37:22 -0700 Subject: [PATCH] [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 --- includes/specials/SpecialSearch.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/includes/specials/SpecialSearch.php b/includes/specials/SpecialSearch.php index d6ce6a4be7..fd24521bdb 100644 --- a/includes/specials/SpecialSearch.php +++ b/includes/specials/SpecialSearch.php @@ -387,7 +387,8 @@ class SpecialSearch extends SpecialPage { $textMatches->free(); } - $hasOtherResults = $textMatches->hasInterwikiResults( SearchResultSet::INLINE_RESULTS ); + $hasOtherResults = $textMatches && + $textMatches->hasInterwikiResults( SearchResultSet::INLINE_RESULTS ); if ( $num === 0 ) { if ( $textStatus ) { -- 2.20.1