Fix headers array processing for wp_mail(). Props gortsleigh. fixes #9284
git-svn-id: https://develop.svn.wordpress.org/trunk@10967 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
3cee48146f
commit
f4f1dd5a05
@ -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
Block a user