Make WordPress Core

Changeset 47580 for trunk


Ignore:
Timestamp:
04/14/2020 11:30:35 AM (4 years ago)
Author:
SergeyBiryukov
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-mail.php

    r47198 r47580  
    214214    $post_title = xmlrpc_getposttitle( $content );
    215215
    216     if ( '' === $post_title ) {
     216    if ( '' === trim( $post_title ) ) {
    217217        $post_title = $subject;
    218218    }
Note: See TracChangeset for help on using the changeset viewer.