Index: src/wp-includes/pluggable.php
===================================================================
--- src/wp-includes/pluggable.php	(revision 36746)
+++ src/wp-includes/pluggable.php	(working copy)
@@ -181,7 +181,7 @@
 	 * @param array $args A compacted array of wp_mail() arguments, including the "to" email,
 	 *                    subject, message, headers, and attachments values.
 	 */
-	$atts = apply_filters( 'wp_mail', compact( 'to', 'subject', 'message', 'headers', 'attachments' ) );
+	$atts = apply_filters( 'wp_mail', compact( 'to', 'subject', 'message', $headers, $attachments ) );
 
 	if ( isset( $atts['to'] ) ) {
 		$to = $atts['to'];
@@ -479,7 +479,7 @@
 		return $phpmailer->Send();
 	} catch ( phpmailerException $e ) {
 
-		$mail_error_data = compact( 'to', 'subject', 'message', 'headers', 'attachments' );
+		$mail_error_data = compact( 'to', 'subject', 'message', $headers, $attachments );
 
 		/**
 		 * Fires after a phpmailerException is caught.
