Skip to content
This repository was archived by the owner on Nov 4, 2021. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Silence notice thrown by php74 on array offset access of non-array types
  • Loading branch information
zehao-sean-huang committed Aug 11, 2020
commit 8d563eae204a90fa0cc61bd829da5d4b8705070a
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;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change is just one line and doesn't affect the existing functionality. Our team is blocked rn so we'd really appreciate it if we could get this change fixed :)

}

/**
Expand Down