From: Mukunda Modell Date: Thu, 11 May 2017 19:59:12 +0000 (-0500) Subject: Check for null before calling a textResults method to (fixes T165091) X-Git-Tag: 1.31.0-rc.0~3272^2 X-Git-Url: https://git.cyclocoop.org/%7B%24admin_url%7Dmembres/cotisations/gestion/rappel_modifier.php?a=commitdiff_plain;h=9592331197eef7abdb2894e73f6978028f640c9f;p=lhc%2Fweb%2Fwiklou.git Check for null before calling a textResults method to (fixes T165091) Bug: T165091 Change-Id: I6fd23eb5fa04049fd7a44faae76f77fae23f5202 --- diff --git a/includes/specials/SpecialSearch.php b/includes/specials/SpecialSearch.php index ceb6b7be6f..2a5016fe53 100644 --- a/includes/specials/SpecialSearch.php +++ b/includes/specials/SpecialSearch.php @@ -356,7 +356,7 @@ class SpecialSearch extends SpecialPage { $hasOtherResults = $textMatches && $textMatches->hasInterwikiResults( SearchResultSet::INLINE_RESULTS ); - if ( $textMatches->hasInterwikiResults( SearchResultSet::SECONDARY_RESULTS ) ) { + if ( $textMatches && $textMatches->hasInterwikiResults( SearchResultSet::SECONDARY_RESULTS ) ) { $out->addHTML( '
' ); } else { $out->addHTML( '
' );