Make WordPress Core

Opened 11 years ago

Closed 11 years ago

#25789 closed enhancement (fixed)

Remove redundant cleanup of PHPMailer addresses in wp_mail

Reported by: bananastalktome's profile bananastalktome Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 3.8 Priority: normal
Severity: trivial Version:
Component: Mail Keywords: has-patch commit
Focuses: Cc:

Description

In the wp_mail() function, ClearAllRecipients(), ClearAddresses(), ClearBCCs(), and ClearCCs() are all called as part of the process of emptying out values set on the $phpmailer object.

Using ClearAllRecipients() should make the other three methods unnecessary, since it already removes all of the recipients (and it doesn't need to loop over anything internally to do so).

This patch removes $phpmailer->ClearAddresses(), $phpmailer->ClearBCCs(), and $phpmailer->ClearCCs().

Attachments (1)

25789.diff (486 bytes) - added by bananastalktome 11 years ago.

Download all attachments as: .zip

Change History (4)

#1 @SergeyBiryukov
11 years ago

  • Keywords commit added
  • Milestone changed from Awaiting Review to 3.8
  • Type changed from defect (bug) to enhancement

Looks good to me.

#2 @SergeyBiryukov
11 years ago

Introduced in [4946].

#3 @SergeyBiryukov
11 years ago

  • Owner set to SergeyBiryukov
  • Resolution set to fixed
  • Status changed from new to closed

In 26121:

Remove redundant cleanup of PHPMailer addresses in wp_mail().

props bananastalktome.
fixes #25789.

Note: See TracTickets for help on using tickets.