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 <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel 2025-06-16 08:30:31 +02:00 committed by backportbot[bot]
parent bf89e3adef
commit bfd0458e86

View file

@ -43,7 +43,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);