Skip to content

Commit

Permalink
stop passing null values to explode() (#179)
Browse files Browse the repository at this point in the history
Signed-off-by: Miloš Gavrilović <[email protected]>
  • Loading branch information
Gavrisimo authored Jul 27, 2023
1 parent 0eaaafc commit 10f6226
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/Tags.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,7 @@ public function limit(?int $limit)
protected function fillAttributeFromRequest(NovaRequest $request, $requestAttribute, $model, $attribute)
{
$requestValue = $request[$requestAttribute];
$tagNames = explode('-----', $requestValue);
$tagNames = array_filter($tagNames);
$tagNames = is_null($requestValue) ? [] : array_filter(explode('-----', $requestValue));

$class = get_class($model);

Expand Down

0 comments on commit 10f6226

Please sign in to comment.