Ticket #30128: 30128.2.patch
File 30128.2.patch, 1.6 KB (added by , 10 years ago) |
---|
-
src/wp-includes/pluggable.php
284 284 // If it's actually got contents 285 285 if ( !empty( $tempheaders ) ) { 286 286 // Iterate through the raw headers 287 foreach ( (array) $tempheaders as $ header ) {287 foreach ( (array) $tempheaders as $key => $header ) { 288 288 if ( strpos($header, ':') === false ) { 289 289 if ( false !== stripos( $header, 'boundary=' ) ) { 290 290 $parts = preg_split('/boundary=/i', trim( $header ) ); 291 291 $boundary = trim( str_replace( array( "'", '"' ), '', $parts[1] ) ); 292 292 } 293 continue; 293 if ( is_numeric ( $key ) ) { 294 continue; 295 } 294 296 } 295 297 // Explode them out 296 list( $name, $content ) = explode( ':', trim( $header ), 2);298 list( $name, $content ) = ( is_numeric ( $key ) ) ? explode( ':', trim( $header ), 2 ) : array ( $key, $header ); 297 299 298 300 // Cleanup crew 299 301 $name = trim( $name ); … … 337 339 } 338 340 break; 339 341 case 'cc': 340 $cc = array_merge( (array) $cc, explode( ',', $content ) ); 341 break; 342 $cc = array_merge( 343 (array) $cc, 344 ( is_array ( $content ) ) ? $content : explode( ',', $content ) 345 ); 342 346 case 'bcc': 343 $bcc = array_merge( (array) $bcc, explode( ',', $content ) ); 344 break; 347 $bcc = array_merge( 348 (array) $bcc, 349 ( is_array ( $content ) ) ? $content : explode( ',', $content ) 350 ); 345 351 default: 346 352 // Add it to our grand headers array 347 353 $headers[trim( $name )] = trim( $content );