[wp-trac] [WordPress Trac] #35598: Use different error code for PHPMailer exceptions in wp_mail_failed
WordPress Trac
noreply at wordpress.org
Wed Nov 2 04:26:19 UTC 2016
#35598: Use different error code for PHPMailer exceptions in wp_mail_failed
-------------------------------------------------+-------------------------
Reporter: Kau-Boy | Owner:
Type: defect (bug) | SergeyBiryukov
Priority: normal | Status: closed
Component: Mail | Milestone: 4.7
Severity: normal | Version: 4.4.1
Keywords: has-patch has-unit-tests needs- | Resolution: fixed
testing | Focuses:
-------------------------------------------------+-------------------------
Changes (by helen):
* status: reviewing => closed
* resolution: => fixed
Comment:
In [changeset:"39086"]:
{{{
#!CommitTicketReference repository="" revision="39086"
Mail: Set a better error code when triggering `wp_mail_failed`.
This error code is now... wait for it... `wp_mail_failed`. Previously,
this would have been the originating PHPMailer error code, which could be
`0`, which would then fail (pass?) the `empty()` check in the `WP_Error`
constructor, thereby rendering the error object fairly useless. The
PHPMailer error code is now located within the `WP_Error` data.
props Kau-Boy, stephenharris.
fixes #35598.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/35598#comment:26>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list