Merge "[search] Fix method call on null value"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Thu, 29 Oct 2015 20:41:00 +0000 (20:41 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Thu, 29 Oct 2015 20:41:00 +0000 (20:41 +0000)
includes/specials/SpecialSearch.php

index 596732d..b100e49 100644 (file)
@@ -388,7 +388,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 ) {