Fix headers array processing for wp_mail(). Props gortsleigh. fixes #9284
git-svn-id: http://svn.automattic.com/wordpress/trunk@10967 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
b50c964869
commit
1a0ce2d2b3
|
@ -260,10 +260,14 @@ function wp_mail( $to, $subject, $message, $headers = '', $attachments = array()
|
|||
// 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 both
|
||||
// string headers and an array of headers.
|
||||
$tempheaders = (array) explode( "\n", $headers );
|
||||
} else {
|
||||
$tempheaders = $headers;
|
||||
}
|
||||
$headers = array();
|
||||
|
||||
// If it's actually got contents
|
||||
|
|
Loading…
Reference in New Issue