1 | diff --git "a/C:\\Users\\user\\AppData\\Local\\Temp\\TortoiseGit\\plu9CA5.tmp\\pluggable-fcf8769-left.php" "b/C:\\Users\\user\\Dropbox\\webmasterka\\wordpress\\wp-includes\\pluggable.php" |
---|
2 | index 0f9e5a3..c93e6ff 100644 |
---|
3 | --- "a/C:\\Users\\user\\AppData\\Local\\Temp\\TortoiseGit\\plu9CA5.tmp\\pluggable-fcf8769-left.php" |
---|
4 | +++ "b/C:\\Users\\user\\Dropbox\\webmasterka\\wordpress\\wp-includes\\pluggable.php" |
---|
5 | @@ -285,16 +285,18 @@ function wp_mail( $to, $subject, $message, $headers = '', $attachments = array() |
---|
6 | // If it's actually got contents |
---|
7 | if ( !empty( $tempheaders ) ) { |
---|
8 | // Iterate through the raw headers |
---|
9 | - foreach ( (array) $tempheaders as $header ) { |
---|
10 | + foreach ( (array) $tempheaders as $key => $header ) { |
---|
11 | if ( strpos($header, ':') === false ) { |
---|
12 | if ( false !== stripos( $header, 'boundary=' ) ) { |
---|
13 | $parts = preg_split('/boundary=/i', trim( $header ) ); |
---|
14 | $boundary = trim( str_replace( array( "'", '"' ), '', $parts[1] ) ); |
---|
15 | } |
---|
16 | - continue; |
---|
17 | + if ( is_numeric ( $key ) ) { |
---|
18 | + continue; |
---|
19 | + } |
---|
20 | } |
---|
21 | // Explode them out |
---|
22 | - list( $name, $content ) = explode( ':', trim( $header ), 2 ); |
---|
23 | + list( $name, $content ) = ( is_numeric ( $key ) ) ? explode( ':', trim( $header ), 2 ) : array ( $key, $header ); |
---|
24 | |
---|
25 | // Cleanup crew |
---|
26 | $name = trim( $name ); |
---|
27 | @@ -331,10 +333,16 @@ function wp_mail( $to, $subject, $message, $headers = '', $attachments = array() |
---|
28 | } |
---|
29 | break; |
---|
30 | case 'cc': |
---|
31 | - $cc = array_merge( (array) $cc, explode( ',', $content ) ); |
---|
32 | + $cc = array_merge( |
---|
33 | + (array) $cc, |
---|
34 | + ( is_array ( $content ) ) ? $content : explode( ',', $content ) |
---|
35 | + ); |
---|
36 | break; |
---|
37 | case 'bcc': |
---|
38 | - $bcc = array_merge( (array) $bcc, explode( ',', $content ) ); |
---|
39 | + $bcc = array_merge( |
---|
40 | + (array) $bcc, |
---|
41 | + ( is_array ( $content ) ) ? $content : explode( ',', $content ) |
---|
42 | + ); |
---|
43 | break; |
---|
44 | default: |
---|
45 | // Add it to our grand headers array |
---|