1
0
Fork 0

Update AccountService, fix json casting

This commit is contained in:
Daniel Supernault 2021-12-30 23:11:46 -07:00
parent 92bc28456d
commit e5f8f3441c
No known key found for this signature in database
GPG Key ID: 0DEF1C662C9033F7
1 changed files with 4 additions and 2 deletions

View File

@ -51,12 +51,14 @@ class AccountService
->map(function($item, $key) { ->map(function($item, $key) {
if($key == 'compose_settings') { if($key == 'compose_settings') {
$cs = self::defaultSettings()['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') { if($key == 'other') {
$other = self::defaultSettings()['other']; $other = self::defaultSettings()['other'];
return array_merge($other, $item ?? []); $mo = is_array($item) ? $item : [];
return array_merge($other, $mo);
} }
return $item; return $item;
}); });