Ticket #21554: wp-email.php.diff
File wp-email.php.diff, 1.0 KB (added by , 12 years ago) |
---|
-
wp-mail.php
73 73 $content_type = trim($line); 74 74 $content_type = substr($content_type, 14, strlen($content_type) - 14); 75 75 $content_type = explode(';', $content_type); 76 if ( ! empty( $content_type[1] )) {76 if ( ! empty( $content_type[1] ) && stripos( $content_type[1], 'charset' ) !== FALSE ) { 77 77 $charset = explode('=', $content_type[1]); 78 78 $charset = ( ! empty( $charset[1] ) ) ? trim($charset[1]) : ''; 79 79 } … … 184 184 } 185 185 186 186 if ( function_exists('iconv') && ! empty( $charset ) ) { 187 $content = iconv($charset, get_option('blog_charset'), $content); 187 $content_check = iconv($charset, get_option('blog_charset'), $content); 188 # If iconv can't read the charset it returns false. Post anyway. 189 if ( false !== $content_check ) { 190 $content = $content_check; 191 } 188 192 } 189 193 190 194 // Captures any text in the body after $phone_delim as the body