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

Commit 8d563ea

Browse files
Silence notice thrown by php74 on array offset access of non-array types
1 parent 9ef326c commit 8d563ea

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ElasticEngine.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ public function map(Builder $builder, $results, $model)
348348
*/
349349
public function getTotalCount($results)
350350
{
351-
return $results['hits']['total']['value'];
351+
return $results['hits']['total']['value'] ?? 0;
352352
}
353353

354354
/**

0 commit comments

Comments
 (0)