From 217d606693b8f2946f3a741659aab5c181a0e980 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 dbf46cba2..28fe2543f 100644 --- a/lib/Controller/AttachmentApiController.php +++ b/lib/Controller/AttachmentApiController.php @@ -47,7 +47,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); }