From e5f8f3441ccf3bb73e2da99b35127fe43eafdd80 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Thu, 30 Dec 2021 23:11:46 -0700 Subject: [PATCH] Update AccountService, fix json casting --- app/Services/AccountService.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/Services/AccountService.php b/app/Services/AccountService.php index b57361069..2c3f97a7b 100644 --- a/app/Services/AccountService.php +++ b/app/Services/AccountService.php @@ -51,12 +51,14 @@ class AccountService ->map(function($item, $key) { if($key == 'compose_settings') { $cs = self::defaultSettings()['compose_settings']; - return array_merge($cs, $item ?? []); + $ms = is_array($item) ? $item : []; + return array_merge($cs, $ms); } if($key == 'other') { $other = self::defaultSettings()['other']; - return array_merge($other, $item ?? []); + $mo = is_array($item) ? $item : []; + return array_merge($other, $mo); } return $item; });