Skip to content

Commit ff40eb6

Browse files
committed
Internal: API: Fix DownloadSelectedDocumentsAction when zip has no files
1 parent 0992107 commit ff40eb6

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/CoreBundle/Controller/Api/DownloadSelectedDocumentsAction.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,10 @@ function () use ($documents, $zipName): void {
7777
$this->addNodeToZip($zip, $node);
7878
}
7979

80+
if (0 === count($zip->files)) {
81+
$zip->addFile('.empty', '');
82+
}
83+
8084
$zip->finish();
8185
},
8286
Response::HTTP_CREATED

0 commit comments

Comments
 (0)