Skip to content

Commit

Permalink
countable fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Murat Paksoy committed Feb 15, 2018
1 parent b72e91e commit 5e0b84a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ElasticsearchEngine.php
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ public function mapIds($results)
*/
public function map($results, $model)
{
if (count($results['hits']['total']) === 0) {
if (is_array($results['hits']['total']) && count($results['hits']['total']) === 0) {
return Collection::make();
}

Expand Down

0 comments on commit 5e0b84a

Please sign in to comment.