Make WordPress Core

Ticket #35781: 35781.2.patch

File 35781.2.patch, 985 bytes (added by shahpranaf, 8 years ago)
  • src/wp-includes/pluggable.php

     
    181181         * @param array $args A compacted array of wp_mail() arguments, including the "to" email,
    182182         *                    subject, message, headers, and attachments values.
    183183         */
    184         $atts = apply_filters( 'wp_mail', compact( 'to', 'subject', 'message', 'headers', 'attachments' ) );
     184        $atts = apply_filters( 'wp_mail', compact( 'to', 'subject', 'message', $headers, $attachments ) );
    185185
    186186        if ( isset( $atts['to'] ) ) {
    187187                $to = $atts['to'];
     
    479479                return $phpmailer->Send();
    480480        } catch ( phpmailerException $e ) {
    481481
    482                 $mail_error_data = compact( 'to', 'subject', 'message', 'headers', 'attachments' );
     482                $mail_error_data = compact( 'to', 'subject', 'message', $headers, $attachments );
    483483
    484484                /**
    485485                 * Fires after a phpmailerException is caught.