Skip to content

Commit

Permalink
capture null default to prevent the error
Browse files Browse the repository at this point in the history
  • Loading branch information
alexjustesen committed Sep 20, 2023
1 parent e36ff79 commit 5732157
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/Filament/Pages/Settings/GeneralPage.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,10 @@ public function form(Form $form): Form

protected function getServerLabels(array $values): array
{
if (count($values) && is_null($values[0])) {
return [];
}

return collect($values)->mapWithKeys(function (string $item, int $key) {
return [$item => $item];
})->toArray();
Expand Down

0 comments on commit 5732157

Please sign in to comment.