Skip to content

Commit

Permalink
Fixed access to undefined key. (#612)
Browse files Browse the repository at this point in the history
  • Loading branch information
den1n authored Apr 5, 2022
1 parent ee3abad commit 499b0f3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Engines/DatabaseEngine.php
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,9 @@ protected function getFullTextOptions(Builder $builder)
}

foreach ((new ReflectionMethod($builder->model, 'toSearchableArray'))->getAttributes(SearchUsingFullText::class) as $attribute) {
$options = array_merge($options, Arr::wrap($attribute->getArguments()[1]));
$arguments = $attribute->getArguments()[1] ?? [];

$options = array_merge($options, Arr::wrap($arguments));
}

return $options;
Expand Down

0 comments on commit 499b0f3

Please sign in to comment.