Skip to content

Commit ada25ab

Browse files
authored
Merge pull request #18728 from simonspa/trashbin_exception
Trash bin: fix exception triggered if no correct fileId is provided.
2 parents e645c5d + b3ad27f commit ada25ab

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

apps/files_trashbin/lib/Controller/PreviewController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,12 +88,12 @@ public function __construct(
8888
* @return DataResponse|Http\FileDisplayResponse
8989
*/
9090
public function getPreview(
91-
int $fileId,
91+
int $fileId = -1,
9292
int $x = 128,
9393
int $y = 128
9494
) {
9595

96-
if ($x === 0 || $y === 0) {
96+
if ($fileId === -1 || $x === 0 || $y === 0) {
9797
return new DataResponse([], Http::STATUS_BAD_REQUEST);
9898
}
9999

0 commit comments

Comments
 (0)