php-imap
php-imap copied to clipboard
Method getAttachments() return duplicate attachments where disposition is attachment
Describe the bug When I foreach return from getAttachments() and list it I recognize that some attachments are listed two times. I recognize it by parameter "part_number"
Code to Reproduce The troubling code section which produces the reported bug.
$zal = $wiadomosc->getAttachments();
foreach($zal as $zala){
$zala_partnumber = $zala->getAttributes()["part_number"];
echo "<textarea>".$zala_partnumber."</textarea>";
echo "<hr />";
}
Expected behavior Get only unique attachments
Desktop / Server (please complete the following information):
- OS: Ubuntu 18.04 LTS
- PHP: 5.5.9
- Version 2.7.2
- Provider Dovecot
Hi @rafaliex , many thanks for your report. This issue has been fixed by @laurent-rizer with #193 .
Please update to latest alpha and change the config option disposition
from ['attachment', 'inline']
to ['attachment']
.
Best regards,