Skip to content

Commit eb4dbdc

Browse files
tcitworldbackportbot[bot]
authored andcommitted
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>
1 parent ac90e02 commit eb4dbdc

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
@@ -43,7 +43,7 @@ public function sharingDisabledForUser(?string $userId) {
4343

4444
if ($excludeGroups && $excludeGroups !== 'no') {
4545
$groupsList = $this->config->getAppValue('core', 'shareapi_exclude_groups_list', '');
46-
$excludedGroups = json_decode($groupsList);
46+
$excludedGroups = json_decode($groupsList, true);
4747
if (is_null($excludedGroups)) {
4848
$excludedGroups = explode(',', $groupsList);
4949
$newValue = json_encode($excludedGroups);

0 commit comments

Comments
 (0)