Make WordPress Core

Changeset 47581


Ignore:
Timestamp:
04/14/2020 11:32:08 AM (6 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.
Merges [47580] to the 5.4 branch.
Fixes #49853.

Location:
branches/5.4
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/5.4

  • branches/5.4/src/wp-mail.php

    r47198 r47581  
    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.