[wp-trac] [WordPress Trac] #28782: Attachment file name changed

WordPress Trac noreply at wordpress.org
Mon Jul 7 20:11:21 UTC 2014


#28782: Attachment file name changed
-----------------------------+------------------------
 Reporter:  p_j_albuquerque  |       Owner:
     Type:  enhancement      |      Status:  closed
 Priority:  normal           |   Milestone:
Component:  Mail             |     Version:  3.9.1
 Severity:  normal           |  Resolution:  duplicate
 Keywords:                   |     Focuses:
-----------------------------+------------------------
Changes (by SergeyBiryukov):

 * status:  new => closed
 * resolution:   => duplicate
 * milestone:  Awaiting Review =>


Old description:

> At the moment WordPress is unable to send an attached file with a default
> name.
>
> wp-includes\pluggable.php
>
> Current
> Line: 483
>         if ( !empty( $attachments ) ) {
>                 foreach ( $attachments as $attachment ) {
>                         try {
>                                 $phpmailer->AddAttachment($attachment);
>                         } catch ( phpmailerException $e ) {
>                                 continue;
>                         }
>                 }
>         }
>
> Change
> Line: 483
> if ( !empty( $attachments ) ) {
>                 foreach ( $attachments as $attachment ) {
>                         try {
>                                 if(is_array($attachment)){
> $phpmailer->AddAttachment($attachment[archive], $attachment[name]);
>                                 }else{
> $phpmailer->AddAttachment($attachment);
>                                 }
>                         } catch ( phpmailerException $e ) {
>                                 continue;
>                         }
>                 }
>         }

New description:

 At the moment WordPress is unable to send an attached file with a default
 name.

 wp-includes\pluggable.php

 Current
 Line: 483
 {{{
         if ( !empty( $attachments ) ) {
                 foreach ( $attachments as $attachment ) {
                         try {
                                 $phpmailer->AddAttachment($attachment);
                         } catch ( phpmailerException $e ) {
                                 continue;
                         }
                 }
         }
 }}}
 Change
 Line: 483
 {{{
         if ( !empty( $attachments ) ) {
                 foreach ( $attachments as $attachment ) {
                         try {
                                 if(is_array($attachment)){
 $phpmailer->AddAttachment($attachment[archive], $attachment[name]);
                                 }else{
 $phpmailer->AddAttachment($attachment);
                                 }
                         } catch ( phpmailerException $e ) {
                                 continue;
                         }
                 }
         }
 }}}

--

Comment:

 Duplicate of #28407.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/28782#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list