Skip to content

Commit

Permalink
Fix null key not being persisted
Browse files Browse the repository at this point in the history
  • Loading branch information
Tarpsvo committed Aug 10, 2023
1 parent 93431a3 commit c6808e1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Http/Controllers/SettingsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 89,7 @@ public function save(NovaRequest $request)
$tempResource = new \Laravel\Nova\Support\Fluent;
$field->fill($request, $tempResource);

if (!isset($tempResource->{$field->attribute})) return;
if (!array_key_exists($field->attribute, $tempResource->getAttributes())) return;

if (isset($existingRow)) {
$existingRow->value = $tempResource->{$field->attribute};
Expand Down

0 comments on commit c6808e1

Please sign in to comment.