Skip to content

Commit a44c7fd

Browse files
Results can be null
Proof it works: https://3v4l.org/MW8q8 In the current situation it will error because of a reference to an array index on null. This fixes this issue.
1 parent a9c27a6 commit a44c7fd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Engines/TNTSearchEngine.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ protected function performSearch(Builder $builder, array $options = [])
193193
*/
194194
public function map(Builder $builder, $results, $model)
195195
{
196-
if (is_null($results['ids']) || count($results['ids']) === 0) {
196+
if (empty($results['ids'])) {
197197
return Collection::make();
198198
}
199199

0 commit comments

Comments
 (0)