[wp-trac] [WordPress Trac] #25789: Remove redundant cleanup of PHPMailer addresses in wp_mail

WordPress Trac noreply at wordpress.org
Thu Oct 31 15:01:35 UTC 2013


#25789: Remove redundant cleanup of PHPMailer addresses in wp_mail
-----------------------------+-----------------------------
 Reporter:  bananastalktome  |      Owner:
     Type:  defect (bug)     |     Status:  new
 Priority:  normal           |  Milestone:  Awaiting Review
Component:  Mail             |    Version:
 Severity:  trivial          |   Keywords:  has-patch
-----------------------------+-----------------------------
 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()`.

--
Ticket URL: <http://core.trac.wordpress.org/ticket/25789>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list