mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-16 14:50:29 +00:00
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. git-svn-id: https://develop.svn.wordpress.org/trunk@39086 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -51,7 +51,7 @@ $multisite = $multisite || ( defined( 'MULTISITE' ) && MULTISITE );
|
||||
|
||||
// Override the PHPMailer
|
||||
require_once( dirname( __FILE__ ) . '/mock-mailer.php' );
|
||||
$phpmailer = new MockPHPMailer();
|
||||
$phpmailer = new MockPHPMailer( true );
|
||||
|
||||
if ( ! defined( 'WP_DEFAULT_THEME' ) ) {
|
||||
define( 'WP_DEFAULT_THEME', 'default' );
|
||||
|
||||
Reference in New Issue
Block a user