﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	severity	resolution	keywords	cc
9284	wp_mail function does not properly process headers array	gortsleigh		"wp_admin is supposed to accept mail headers either as a string or as an array, but if an array is specified the headers are processed differently than if a string is specified. 

The fix is below.
{{{
Index: pluggable.php
===================================================================
--- pluggable.php       (revision 10712)
+++ pluggable.php       (working copy)
@@ -275,10 +275,14 @@
        // Headers
        if ( empty( $headers ) ) {
                $headers = array();
-       } elseif ( !is_array( $headers ) ) {
-               // Explode the headers out, so this function can take both
-               // string headers and an array of headers.
-               $tempheaders = (array) explode( ""\n"", $headers );
+       } else {
+               if ( !is_array( $headers ) ) {
+                       // Explode the headers out, so this function can take either
+                       // string headers or an array of headers.
+                       $tempheaders = (array) explode( ""\n"", $headers );
+               } else {
+                       $tempheaders = $headers;
+               }
                $headers = array();
 
                // If it's actually got contents

}}}"	defect (bug)	closed	normal	2.8	Mail	2.7.1	normal	fixed	has-patch tested	
