Update PronounService, fix jsonn_decode null parameter

pull/3655/head
Daniel Supernault 2022-09-11 05:42:49 -06:00
rodzic 61d26e85cd
commit d72cd819d2
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 0DEF1C662C9033F7
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -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) : [];
});
}