From 43622b50dc11f8c161776c460c5b1bb3328dc4d3 Mon Sep 17 00:00:00 2001 From: the-djmaze <> Date: Sun, 24 Mar 2024 20:30:26 +0100 Subject: [PATCH] Bugfix PHP Warning: Undefined array key --- .../v/0.0.0/app/libraries/RainLoop/Actions/Attachments.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/snappymail/v/0.0.0/app/libraries/RainLoop/Actions/Attachments.php b/snappymail/v/0.0.0/app/libraries/RainLoop/Actions/Attachments.php index 634bacc06..2e66b0b91 100644 --- a/snappymail/v/0.0.0/app/libraries/RainLoop/Actions/Attachments.php +++ b/snappymail/v/0.0.0/app/libraries/RainLoop/Actions/Attachments.php @@ -71,7 +71,7 @@ trait Attachments $oZip->setArchiveComment('SnappyMail/'.APP_VERSION); foreach ($aData as $aItem) { $sFileName = ($mUIDs ? "{$aItem['uid']}/" : ($sFolder ? "{$aItem['uid']}-" : '')) . $aItem['fileName']; - if ($aItem['data']) { + if (isset($aItem['data'])) { if (!$oZip->addFromString($sFileName, $aItem['data'])) { $bError = true; } @@ -164,7 +164,7 @@ trait Attachments } else if (!empty($aValues['folder']) && !empty($aValues['uid'])) { $sFolder = (string) $aValues['folder']; $iUid = (int) $aValues['uid']; - $sMimeIndex = (string) $aValues['mimeIndex']; + $sMimeIndex = (string) $aValues['mimeIndex'] ?: ''; $oFileProvider = $this->FilesProvider(); $mResult = $this->MailClient()->MessageMimeStream( function ($rResource, $sContentType, $sFileName, $sMimeIndex = '')