From f363a3275acb0fc18787c1b02e43b7292c26f246 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Tue, 8 Feb 2022 03:30:05 -0700 Subject: [PATCH] Update SettingsController --- app/Http/Controllers/SettingsController.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/Http/Controllers/SettingsController.php b/app/Http/Controllers/SettingsController.php index bb7677373..628a742ec 100644 --- a/app/Http/Controllers/SettingsController.php +++ b/app/Http/Controllers/SettingsController.php @@ -257,7 +257,9 @@ class SettingsController extends Controller public function mediaSettings(Request $request) { $setting = UserSetting::whereUserId($request->user()->id)->firstOrFail(); - $compose = $setting->compose_settings ? json_decode($setting->compose_settings, true) : [ + $compose = $setting->compose_settings ? ( + is_string($setting->compose_settings) ? json_decode($setting->compose_settings, true) : $setting->compose_settings + ) : [ 'default_license' => null, 'media_descriptions' => false ];