php-imap icon indicating copy to clipboard operation
php-imap copied to clipboard

Method getAttachments() return duplicate attachments where disposition is attachment

Open rafaliex opened this issue 3 years ago • 1 comments

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

rafaliex avatar Dec 19 '21 22:12 rafaliex

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,

Webklex avatar Feb 03 '22 16:02 Webklex