diff options
author | Thomas Citharel <tcit@tcit.fr> | 2025-06-16 08:30:31 +0200 |
---|---|---|
committer | Thomas Citharel <tcit@tcit.fr> | 2025-06-16 08:30:31 +0200 |
commit | e2195a2f6d6cb0cef35e08d57e03a3420380cac2 (patch) | |
tree | 17421121eb9740e6dd9e255b644b75622170c7ee | |
parent | 9b29df2dd59dffa85a29098d5684900f732ce584 (diff) | |
download | nextcloud-server-fix-json-decoding-groups-excluded-from-share.tar.gz nextcloud-server-fix-json-decoding-groups-excluded-from-share.zip |
fix(sharing): fix json decoding the list of groups excluded from sharingfix-json-decoding-groups-excluded-from-share
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 <tcit@tcit.fr>
-rw-r--r-- | lib/private/Share20/ShareDisableChecker.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/private/Share20/ShareDisableChecker.php b/lib/private/Share20/ShareDisableChecker.php index 8cf523b8b31..286be7a1036 100644 --- a/lib/private/Share20/ShareDisableChecker.php +++ b/lib/private/Share20/ShareDisableChecker.php @@ -38,7 +38,7 @@ class ShareDisableChecker { 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); |