Skip to content

Commit

Permalink
Merge pull request #3042 from nextcloud/checkArrayKey
Browse files Browse the repository at this point in the history
fix: check if array key exists
  • Loading branch information
solracsf authored Jul 12, 2024
2 parents 6eed151 + 9c481bf commit f9b8f1e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Controller/FolderController.php
Original file line number Diff line number Diff line change
Expand Up @@ -304,9 +304,9 @@ private function buildOCSResponseXML(string $format, DataResponse $data): V1Resp
}

private function folderDataForXML(array $data): array {
$groups = $data['group_details'];
$data['groups'] = [];
$groups = $data['group_details'] ?? [];
unset($data['group_details']);
$data['groups'] = [];
foreach ($groups as $id => $group) {
$data['groups'][] = [
'@group_id' => $id,
Expand Down

0 comments on commit f9b8f1e

Please sign in to comment.