From bfd0458e86b4b39eddf78e7c211689b6cb12bd23 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Mon, 16 Jun 2025 08:30:31 +0200 Subject: [PATCH] fix(sharing): fix json decoding the list of groups excluded from sharing json_decode() returns stdclass by default instead of an associative object, which can't be used for array_diff or array_intersect later Signed-off-by: Thomas Citharel --- lib/private/Share20/ShareDisableChecker.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/private/Share20/ShareDisableChecker.php b/lib/private/Share20/ShareDisableChecker.php index 9b8bc01558c59..821533f9a805b 100644 --- a/lib/private/Share20/ShareDisableChecker.php +++ b/lib/private/Share20/ShareDisableChecker.php @@ -43,7 +43,7 @@ public function sharingDisabledForUser(?string $userId) { if ($excludeGroups && $excludeGroups !== 'no') { $groupsList = $this->config->getAppValue('core', 'shareapi_exclude_groups_list', ''); - $excludedGroups = json_decode($groupsList); + $excludedGroups = json_decode($groupsList, true); if (is_null($excludedGroups)) { $excludedGroups = explode(',', $groupsList); $newValue = json_encode($excludedGroups);