Changeset 47054 for trunk/src/wp-mail.php
- Timestamp:
- 01/09/2020 12:53:29 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-mail.php
r45932 r47054 102 102 $content_transfer_encoding = $content_transfer_encoding[0]; 103 103 } 104 if ( ( $content_type == 'multipart/alternative' ) && ( false !== strpos( $line, 'boundary="' ) ) && ( ''== $boundary ) ) {104 if ( ( 'multipart/alternative' === $content_type ) && ( false !== strpos( $line, 'boundary="' ) ) && ( '' === $boundary ) ) { 105 105 $boundary = trim( $line ); 106 106 $boundary = explode( '"', $boundary ); … … 143 143 144 144 if ( preg_match( '/Date: /i', $line ) ) { // of the form '20 Mar 2002 20:32:37 +0100' 145 $ddate = str_replace( 'Date: ', '', trim( $line ) );146 $ddate = preg_replace( '!\s*\(.+\)\s*$!', '', $ddate ); // remove parenthesised timezone string if it exists, as this confuses strtotime147 $ddate_ U= strtotime( $ddate );148 $post_date = gmdate( 'Y-m-d H:i:s', $ddate_U+ $time_difference );149 $post_date_gmt = gmdate( 'Y-m-d H:i:s', $ddate_U);145 $ddate = str_replace( 'Date: ', '', trim( $line ) ); 146 $ddate = preg_replace( '!\s*\(.+\)\s*$!', '', $ddate ); // remove parenthesised timezone string if it exists, as this confuses strtotime 147 $ddate_timestamp = strtotime( $ddate ); 148 $post_date = gmdate( 'Y-m-d H:i:s', $ddate_timestamp + $time_difference ); 149 $post_date_gmt = gmdate( 'Y-m-d H:i:s', $ddate_timestamp ); 150 150 } 151 151 } … … 163 163 $subject = trim( $subject ); 164 164 165 if ( $content_type == 'multipart/alternative') {165 if ( 'multipart/alternative' === $content_type ) { 166 166 $content = explode( '--' . $boundary, $content ); 167 167 $content = $content[2]; … … 213 213 $post_title = xmlrpc_getposttitle( $content ); 214 214 215 if ( $post_title == '') {215 if ( '' === $post_title ) { 216 216 $post_title = $subject; 217 217 }
Note: See TracChangeset
for help on using the changeset viewer.