From: Erik Bernhardson Date: Thu, 29 Oct 2015 01:37:22 +0000 (-0700) Subject: [search] Fix method call on null value X-Git-Tag: 1.31.0-rc.0~9177^2 X-Git-Url: http://git.cyclocoop.org/%7B%7B%20url_for%28%27admin_vote_add%27%29%20%7D%7D?a=commitdiff_plain;h=9250e72a6c4d187f1f3a35f486d35bb8b6317488;p=lhc%2Fweb%2Fwiklou.git [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 --- 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 ) {