Skip to content

Commit e2195a2

Browse files
committed
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 <[email protected]>
1 parent 9b29df2 commit e2195a2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/private/Share20/ShareDisableChecker.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public function sharingDisabledForUser(?string $userId): bool {
3838

3939
if ($excludeGroups && $excludeGroups !== 'no') {
4040
$groupsList = $this->config->getAppValue('core', 'shareapi_exclude_groups_list', '');
41-
$excludedGroups = json_decode($groupsList);
41+
$excludedGroups = json_decode($groupsList, true);
4242
if (is_null($excludedGroups)) {
4343
$excludedGroups = explode(',', $groupsList);
4444
$newValue = json_encode($excludedGroups);

0 commit comments

Comments
 (0)