diff --git a/lib/Controller/FolderController.php b/lib/Controller/FolderController.php index 6ed421019..a2ed2262b 100644 --- a/lib/Controller/FolderController.php +++ b/lib/Controller/FolderController.php @@ -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,