WordPress.org

Make WordPress Core

Ticket #30266: 30266.diff

File 30266.diff, 1.5 KB (added by valendesigns, 5 years ago)
  • src/wp-includes/pluggable.php

    diff --git src/wp-includes/pluggable.php src/wp-includes/pluggable.php
    index 22c1935..9e200ab 100644
    function wp_mail( $to, $subject, $message, $headers = '', $attachments = array() 
    352352
    353353        // From email and name
    354354        // If we don't have a name from the input headers
    355         if ( !isset( $from_name ) )
     355        if ( empty( $from_name ) )
    356356                $from_name = 'WordPress';
    357357
    358358        /* If we don't have an email from the input headers default to wordpress@$sitename
    function wp_mail( $to, $subject, $message, $headers = '', $attachments = array() 
    362362         * https://core.trac.wordpress.org/ticket/5007.
    363363         */
    364364
    365         if ( !isset( $from_email ) ) {
     365        if ( empty( $from_email ) ) {
    366366                // Get the site domain and get rid of www.
    367367                $sitename = strtolower( $_SERVER['SERVER_NAME'] );
    368368                if ( substr( $sitename, 0, 4 ) == 'www.' ) {
    function wp_mail( $to, $subject, $message, $headers = '', $attachments = array() 
    456456
    457457        // Set Content-Type and charset
    458458        // If we don't have a content-type from the input headers
    459         if ( !isset( $content_type ) )
     459        if ( empty( $content_type ) )
    460460                $content_type = 'text/plain';
    461461
    462462        /**
    function wp_mail( $to, $subject, $message, $headers = '', $attachments = array() 
    475475                $phpmailer->IsHTML( true );
    476476
    477477        // If we don't have a charset from the input headers
    478         if ( !isset( $charset ) )
     478        if ( empty( $charset ) )
    479479                $charset = get_bloginfo( 'charset' );
    480480
    481481        // Set the content-type and charset