From 11a1a5f38a55e3942019f60cd5ed6eab9f2322cb Mon Sep 17 00:00:00 2001 From: Vic Vl Date: Thu, 5 Oct 2023 01:33:42 +0300 Subject: [PATCH] Fix disposition check in Mailbox.php Seems like code left by mistake 'attachment' === $partStructure->disposition since this check already done and stored in the $dispositionAttachment variable. --- src/PhpImap/Mailbox.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PhpImap/Mailbox.php b/src/PhpImap/Mailbox.php index 02a3dad9..bd5fa452 100644 --- a/src/PhpImap/Mailbox.php +++ b/src/PhpImap/Mailbox.php @@ -1791,7 +1791,7 @@ protected function initMailPart(IncomingMail $mail, object $partStructure, $part } // check if the part is a subpart of another attachment part (RFC822) - if ('RFC822' === $partStructure->subtype && isset($partStructure->disposition) && 'attachment' === $partStructure->disposition) { + if ('RFC822' === $partStructure->subtype && isset($partStructure->disposition) && $dispositionAttachment) { // Although we are downloading each part separately, we are going to download the EML to a single file //incase someone wants to process or parse in another process $attachment = self::downloadAttachment($dataInfo, $params, $partStructure, false);