[wp-trac] [WordPress Trac] #35598: Use different error code for PHPMailer exceptions in wp_mail_failed

WordPress Trac noreply at wordpress.org
Mon Jan 25 12:35:19 UTC 2016


#35598: Use different error code for PHPMailer exceptions in wp_mail_failed
--------------------------+------------------------------
 Reporter:  Kau-Boy       |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Mail          |     Version:  4.4.1
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |     Focuses:
--------------------------+------------------------------

Comment (by Kau-Boy):

 The first argument in a call to `WP_Error` is usually always a static
 string (see: https://codex.wordpress.org/Class_Reference/WP_Error). So in
 my opinion it is more consistent to also use it for this case.

 The `PHPMailerException` usually only takes the first parameter, which
 hold the error message. This message would be available as the second
 argument in `WP_Error`.

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


More information about the wp-trac mailing list