From aa98c3505ca716114916b65a437a4a9141ca0183 Mon Sep 17 00:00:00 2001 From: KodeStar Date: Thu, 17 Nov 2022 00:20:54 +0000 Subject: [PATCH] Don't break if default search provider deleted from yaml Fixes #904 --- app/Setting.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Setting.php b/app/Setting.php index 74850abc..10125a9f 100644 --- a/app/Setting.php +++ b/app/Setting.php @@ -75,7 +75,7 @@ class Setting extends Model if ($this->key === 'search_provider') { $options = Search::providers()->pluck('name', 'id')->toArray(); } - $value = __($options[$this->value]); + $value = (array_key_exists($this->value, $options)) ? __($options[$this->value]) : __('app.options.none'); } else { $value = __('app.options.none'); }