From d72cd819d2ef74f2ad4fdc1813380d683770c17f Mon Sep 17 00:00:00 2001 From: Daniel Supernault <877217+dansup@users.noreply.github.com> Date: Sun, 11 Sep 2022 05:42:49 -0600 Subject: [PATCH] Update PronounService, fix jsonn_decode null parameter --- app/Services/PronounService.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Services/PronounService.php b/app/Services/PronounService.php index f8185b97..dce1d591 100644 --- a/app/Services/PronounService.php +++ b/app/Services/PronounService.php @@ -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) : []; }); }