From 59797e9ce4166c6ff65a49675d6fbf59327d2ce1 Mon Sep 17 00:00:00 2001 From: Christoph Wurst Date: Thu, 12 Dec 2019 15:27:03 +0100 Subject: Treat MIME part IDs as strings, not ints Signed-off-by: Christoph Wurst --- lib/Controller/MessagesController.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/Controller/MessagesController.php') diff --git a/lib/Controller/MessagesController.php b/lib/Controller/MessagesController.php index 2e949df28..d4ca2c4a6 100755 --- a/lib/Controller/MessagesController.php +++ b/lib/Controller/MessagesController.php @@ -278,7 +278,7 @@ class MessagesController extends Controller { * @return AttachmentDownloadResponse */ public function downloadAttachment(int $accountId, string $folderId, int $messageId, - int $attachmentId) { + string $attachmentId) { $mailBox = $this->getFolder($accountId, $folderId); $attachment = $mailBox->getAttachment($messageId, $attachmentId); @@ -300,10 +300,10 @@ class MessagesController extends Controller { * @return JSONResponse */ public function saveAttachment(int $accountId, string $folderId, int $messageId, - int $attachmentId, string $targetPath) { + string $attachmentId, string $targetPath) { $mailBox = $this->getFolder($accountId, $folderId); - if ($attachmentId === 0) { + if ($attachmentId === '0') { // Save all attachments /* @var $m IMAPMessage */ $m = $mailBox->getMessage($messageId); -- cgit v1.2.3