Skip to content

Commit

Permalink
Results can be null
Browse files Browse the repository at this point in the history
In the current situation it will error because of a reference to an array index on null. 
This fixes this issue.
  • Loading branch information
HexPande authored Mar 17, 2021
1 parent 2690996 commit 3b3b527
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Engines/TNTSearchEngine.php
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,10 @@ public function getBuilder($model)
*/
public function mapIds($results)
{
if (empty($results['ids'])) {
return collect();
}

return collect($results['ids'])->values();
}

Expand Down

0 comments on commit 3b3b527

Please sign in to comment.