[wp-trac] [WordPress Trac] #50297: Don't print "title" headline if no title is set in _wp_die_handler_exit() / _wp_die_handler_txt()

WordPress Trac noreply at wordpress.org
Mon Jun 1 20:45:05 UTC 2020


#50297: Don't print "title" headline if no title is set in _wp_die_handler_exit() /
_wp_die_handler_txt()
------------------------------+--------------------
 Reporter:  ocean90           |      Owner:  (none)
     Type:  defect (bug)      |     Status:  new
 Priority:  normal            |  Milestone:  5.5
Component:  Build/Test Tools  |    Version:
 Severity:  normal            |   Keywords:
  Focuses:                    |
------------------------------+--------------------
 `$title` is an optional argument for `wp_die()` and may therefore not be
 set. In such cases the title headline shouldn't be printed.

 Example:


 {{{
 ❯ composer run test
 > @php ./vendor/phpunit/phpunit/phpunit
 PHP Warning:  mysqli_real_connect(): (HY000/2002): Connection refused in
 src/wp-includes/wp-db.php on line 1633

 wp_die called
 Message: <p><code>Connection refused</code></p>
 <h1>Error establishing a database connection</h1>
 <p>This either means that the username and password information in your
 <code>wp-config.php</code> file is incorrect or we can’t contact the
 database server at <code>127.0.0.1</code>. This could mean your
 host’s database server is down.</p>
 <ul>
 <li>Are you sure you have the correct username and password?</li>
 <li>Are you sure you have typed the correct hostname?</li>
 <li>Are you sure the database server is running?</li>
 </ul>
 <p>If you’re unsure what these terms mean you should probably
 contact your host. If you still need help you can always visit the <a
 href="https://wordpress.org/support/forums/">WordPress Support
 Forums</a>.</p>

 Title:
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/50297>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list