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
|
// Headers
|
||||||
if ( empty( $headers ) ) {
|
if ( empty( $headers ) ) {
|
||||||
$headers = array();
|
$headers = array();
|
||||||
} elseif ( !is_array( $headers ) ) {
|
} else {
|
||||||
// Explode the headers out, so this function can take both
|
if ( !is_array( $headers ) ) {
|
||||||
// string headers and an array of headers.
|
// Explode the headers out, so this function can take both
|
||||||
$tempheaders = (array) explode( "\n", $headers );
|
// string headers and an array of headers.
|
||||||
|
$tempheaders = (array) explode( "\n", $headers );
|
||||||
|
} else {
|
||||||
|
$tempheaders = $headers;
|
||||||
|
}
|
||||||
$headers = array();
|
$headers = array();
|
||||||
|
|
||||||
// If it's actually got contents
|
// If it's actually got contents
|
||||||
|
Loading…
Reference in New Issue
Block a user