[wp-trac] [WordPress Trac] #28782: Attachment file name changed
WordPress Trac
noreply at wordpress.org
Mon Jul 7 20:04:19 UTC 2014
#28782: Attachment file name changed
-----------------------------+-----------------------------
Reporter: p_j_albuquerque | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Mail | Version: 3.9.1
Severity: normal | Keywords:
Focuses: |
-----------------------------+-----------------------------
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;
}
}
}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/28782>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list