Make WordPress Core

Opened 10 years ago

Closed 10 years ago

#28782 closed enhancement (duplicate)

Attachment file name changed

Reported by: p_j_albuquerque's profile p_j_albuquerque Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.9.1
Component: Mail Keywords:
Focuses: Cc:

Description (last modified by SergeyBiryukov)

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;
			}
		}
	}

Attachments (1)

pluggable.php (70.3 KB) - added by p_j_albuquerque 10 years ago.
Change Line: 487 to 490

Download all attachments as: .zip

Change History (2)

@p_j_albuquerque
10 years ago

Change Line: 487 to 490

#1 @SergeyBiryukov
10 years ago

  • Description modified (diff)
  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #28407.

Note: See TracTickets for help on using tickets.