Skip to content

Commit

Permalink
fix: check if array key exists
Browse files Browse the repository at this point in the history
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
  • Loading branch information
solracsf authored Jul 5, 2024
1 parent 243e0ec commit 7c651c6
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions lib/Controller/FolderController.php
Original file line number Diff line number Diff line change
Expand Up @@ -304,9 +304,14 @@ private function buildOCSResponseXML(string $format, DataResponse $data): V1Resp
}

private function folderDataForXML(array $data): array {
$groups = $data['group_details'];
$groups = [];

if (isset($data['group_details'])) {
$groups = $data['group_details'];
unset($data['group_details']);
}

$data['groups'] = [];
unset($data['group_details']);
foreach ($groups as $id => $group) {
$data['groups'][] = [
'@group_id' => $id,
Expand Down

0 comments on commit 7c651c6

Please sign in to comment.