Mail: Make the check for empty post title in `wp-mail.php` more resilient.

This addresses a regression in [47054], which caused posts sent via email to published with an empty title.

Props whyisjake, Otto42, MarkRH, MattyRob, mukesh27, afragen, pikamander2.
Fixes #49853.
Built from https://develop.svn.wordpress.org/trunk@47580


git-svn-id: http://core.svn.wordpress.org/trunk@47355 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2020-04-14 11:32:06 +00:00
parent a21b8a91c6
commit a4f6f2beae
2 changed files with 2 additions and 2 deletions

View File

@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.5-alpha-47578';
$wp_version = '5.5-alpha-47580';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.

View File

@ -213,7 +213,7 @@ for ( $i = 1; $i <= $count; $i++ ) {
$post_title = xmlrpc_getposttitle( $content );
if ( '' === $post_title ) {
if ( '' === trim( $post_title ) ) {
$post_title = $subject;
}