Skip to content

Commit b25a50b

Browse files
Merge pull request #8219 from nextcloud/fix/attachment-api-upload-typeerror
fix: avoid a TypeError when uploading an attachment via the API
2 parents b142dcf + f46514d commit b25a50b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/Controller/AttachmentApiController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public function display(int $cardId, int $attachmentId, string $type = 'deck_fil
4848
#[CORS]
4949
#[NoCSRFRequired]
5050
public function create(int $cardId, string $type, ?string $data): DataResponse {
51-
$attachment = $this->attachmentService->create($cardId, $type, $data);
51+
$attachment = $this->attachmentService->create($cardId, $type, $data ?? '');
5252
return new DataResponse($attachment, HTTP::STATUS_OK);
5353
}
5454

0 commit comments

Comments
 (0)