Update PronounService, fix jsonn_decode null parameter

This commit is contained in:
Daniel Supernault 2022-09-11 05:42:49 -06:00
parent 61d26e85cd
commit d72cd819d2
No known key found for this signature in database
GPG Key ID: 0DEF1C662C9033F7
1 changed files with 1 additions and 1 deletions

View File

@ -15,7 +15,7 @@ class PronounService {
return Cache::remember($key, $ttl, function() use($id) {
$res = UserPronoun::whereProfileId($id)->first();
return $res ? json_decode($res->pronouns, true) : [];
return $res && $res->pronouns ? json_decode($res->pronouns, true) : [];
});
}