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"
index 0f9e5a3..c93e6ff 100644
old
|
new
|
function wp_mail( $to, $subject, $message, $headers = '', $attachments = array() |
285 | 285 | // If it's actually got contents |
286 | 286 | if ( !empty( $tempheaders ) ) { |
287 | 287 | // Iterate through the raw headers |
288 | | foreach ( (array) $tempheaders as $header ) { |
| 288 | foreach ( (array) $tempheaders as $key => $header ) { |
289 | 289 | if ( strpos($header, ':') === false ) { |
290 | 290 | if ( false !== stripos( $header, 'boundary=' ) ) { |
291 | 291 | $parts = preg_split('/boundary=/i', trim( $header ) ); |
292 | 292 | $boundary = trim( str_replace( array( "'", '"' ), '', $parts[1] ) ); |
293 | 293 | } |
294 | | continue; |
| 294 | if ( is_numeric ( $key ) ) { |
| 295 | continue; |
| 296 | } |
295 | 297 | } |
296 | 298 | // Explode them out |
297 | | list( $name, $content ) = explode( ':', trim( $header ), 2 ); |
| 299 | list( $name, $content ) = ( is_numeric ( $key ) ) ? explode( ':', trim( $header ), 2 ) : array ( $key, $header ); |
298 | 300 | |
299 | 301 | // Cleanup crew |
300 | 302 | $name = trim( $name ); |
… |
… |
function wp_mail( $to, $subject, $message, $headers = '', $attachments = array() |
331 | 333 | } |
332 | 334 | break; |
333 | 335 | case 'cc': |
334 | | $cc = array_merge( (array) $cc, explode( ',', $content ) ); |
| 336 | $cc = array_merge( |
| 337 | (array) $cc, |
| 338 | ( is_array ( $content ) ) ? $content : explode( ',', $content ) |
| 339 | ); |
335 | 340 | break; |
336 | 341 | case 'bcc': |
337 | | $bcc = array_merge( (array) $bcc, explode( ',', $content ) ); |
| 342 | $bcc = array_merge( |
| 343 | (array) $bcc, |
| 344 | ( is_array ( $content ) ) ? $content : explode( ',', $content ) |
| 345 | ); |
338 | 346 | break; |
339 | 347 | default: |
340 | 348 | // Add it to our grand headers array |