From 58a733daa809f77959f8f6136aa3c9ecf1ea2f3a Mon Sep 17 00:00:00 2001 From: Alex Justesen Date: Tue, 19 Sep 2023 20:03:04 -0400 Subject: [PATCH] [Bugfix] Capture null speedtest server default to prevent the error (#793) --- app/Filament/Pages/Settings/GeneralPage.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/Filament/Pages/Settings/GeneralPage.php b/app/Filament/Pages/Settings/GeneralPage.php index 526e021cf..728defa8e 100644 --- a/app/Filament/Pages/Settings/GeneralPage.php +++ b/app/Filament/Pages/Settings/GeneralPage.php @@ -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();