Make WordPress Core

Changeset 47882


Ignore:
Timestamp:
06/01/2020 08:48:27 PM (5 years ago)
Author:
ocean90
Message:

Build/Test Tools: Avoid an empty "title" heading if no title is set in _wp_die_handler_exit() and _wp_die_handler_txt().

Fixes #50297.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/includes/functions.php

    r47880 r47882  
    206206function _wp_die_handler_txt( $message, $title, $args ) {
    207207    echo "\nwp_die called\n";
    208     echo "Message : $message\n";
    209     echo "Title : $title\n";
     208    echo "Message: $message\n";
     209
     210    if ( ! empty( $title ) ) {
     211        echo "Title: $title\n";
     212    }
     213
    210214    if ( ! empty( $args ) ) {
    211215        echo "Args: \n";
     
    225229function _wp_die_handler_exit( $message, $title, $args ) {
    226230    echo "\nwp_die called\n";
    227     echo "Message : $message\n";
    228     echo "Title : $title\n";
     231    echo "Message: $message\n";
     232
     233    if ( ! empty( $title ) ) {
     234        echo "Title: $title\n";
     235    }
     236
    229237    if ( ! empty( $args ) ) {
    230238        echo "Args: \n";
Note: See TracChangeset for help on using the changeset viewer.