MDL-61281 search_solr: PHP 7.2 compatible counts

This commit is contained in:
David Monllao
2018-01-28 19:00:45 +01:00
parent 3f8287efe3
commit 512f9e294f
+3 -1
View File
@@ -231,7 +231,9 @@ class engine extends \core_search\engine {
} else if (isset($response->response->numFound)) {
// Get the number of results for standard queries.
$found = $response->response->numFound;
$included = count($response->response->docs);
if ($found > 0 && is_array($response->response->docs)) {
$included = count($response->response->docs);
}
}
return array($included, $found);