From f46514d49d428d5bf56a73393fb71438b3607489 Mon Sep 17 00:00:00 2001 From: Git'Fellow <12234510+solracsf@users.noreply.github.com> Date: Thu, 30 Jul 2026 09:22:31 +0200 Subject: [PATCH] fix: avoid a TypeError when uploading an attachment via the API Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com> --- lib/Controller/AttachmentApiController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Controller/AttachmentApiController.php b/lib/Controller/AttachmentApiController.php index d8a35db59..b50e7d9f9 100644 --- a/lib/Controller/AttachmentApiController.php +++ b/lib/Controller/AttachmentApiController.php @@ -48,7 +48,7 @@ public function display(int $cardId, int $attachmentId, string $type = 'deck_fil #[CORS] #[NoCSRFRequired] public function create(int $cardId, string $type, ?string $data): DataResponse { - $attachment = $this->attachmentService->create($cardId, $type, $data); + $attachment = $this->attachmentService->create($cardId, $type, $data ?? ''); return new DataResponse($attachment, HTTP::STATUS_OK); }