From: Stanislav Malyshev Date: Mon, 22 Jan 2018 20:13:34 +0000 (-0800) Subject: Use getSize since SearchSuggestionSet does not implement Countable X-Git-Tag: 1.31.0-rc.0~824^2 X-Git-Url: https://git.cyclocoop.org/%28%28?a=commitdiff_plain;h=030da07b1834430b2720bdfcbfb63095380431a5;p=lhc%2Fweb%2Fwiklou.git Use getSize since SearchSuggestionSet does not implement Countable Bug: T184934 Change-Id: I39459352399e2023149b715b049084826df22935 --- diff --git a/includes/search/SearchEngine.php b/includes/search/SearchEngine.php index 4253193878..7ac24c5d25 100644 --- a/includes/search/SearchEngine.php +++ b/includes/search/SearchEngine.php @@ -543,7 +543,7 @@ abstract class SearchEngine { $this->setLimitOffset( $fallbackLimit ); $fallbackSearchResult = $this->completionSearch( $fbs ); $results->appendAll( $fallbackSearchResult ); - $fallbackLimit -= count( $fallbackSearchResult ); + $fallbackLimit -= $fallbackSearchResult->getSize(); if ( $fallbackLimit <= 0 ) { break; }