WordPress.org

Make WordPress Core


Ignore:
Timestamp:
11/02/2016 04:26:18 AM (21 months ago)
Author:
helen
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/includes/bootstrap.php

    r38908 r39086  
    5252// Override the PHPMailer
    5353require_once( dirname( __FILE__ ) . '/mock-mailer.php' );
    54 $phpmailer = new MockPHPMailer();
     54$phpmailer = new MockPHPMailer( true );
    5555
    5656if ( ! defined( 'WP_DEFAULT_THEME' ) ) {
Note: See TracChangeset for help on using the changeset viewer.