From a6ede6cc5882f873c56fecbcb22111571a8c5627 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20Klabbers?= Date: Tue, 23 Jul 2024 14:32:30 +0200 Subject: [PATCH] fix: json_decode on null is deprecated --- src/Jobs/AutoAssignUserGroups.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Jobs/AutoAssignUserGroups.php b/src/Jobs/AutoAssignUserGroups.php index 5897671..10f2901 100644 --- a/src/Jobs/AutoAssignUserGroups.php +++ b/src/Jobs/AutoAssignUserGroups.php @@ -39,7 +39,7 @@ public function __construct(User $user) public function handle(SettingsRepositoryInterface $settings, Dispatcher $dispatcher) { - $entries = json_decode($settings->get('fof-gamification.autoAssignedGroups'), true); + $entries = json_decode($settings->get('fof-gamification.autoAssignedGroups', ''), true); // If there are no entries, or if the subject user is an admin, we can skip this job if (!is_array($entries) || $this->user->isAdmin()) {