Skip to content
This repository has been archived by the owner on Nov 4, 2021. It is now read-only.

Commit

Permalink
Merge pull request #382 from Geziwen/bugfix-php74-array-offset-notice
Browse files Browse the repository at this point in the history
Silence notice thrown by php74 on array offset access of non-array types
  • Loading branch information
babenkoivan committed Aug 13, 2020
2 parents 9ef326c + 8d563ea commit 6daad2e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ElasticEngine.php
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ public function map(Builder $builder, $results, $model)
*/
public function getTotalCount($results)
{
return $results['hits']['total']['value'];
return $results['hits']['total']['value'] ?? 0;
}

/**
Expand Down

0 comments on commit 6daad2e

Please sign in to comment.