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

Commit

Permalink
Silence notice thrown by php74 on array offset access of non-array types
Browse files Browse the repository at this point in the history
  • Loading branch information
zehao-sean-huang committed Aug 11, 2020
1 parent 9ef326c commit 8d563ea
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 8d563ea

Please sign in to comment.