Bootstrap/Load: Fix bug causing AJAX functions to return a 500 when passing a `null` response to `wp_die()`.

This bug was introduced in [44497].

Props ocean90.
See #45933.

Built from https://develop.svn.wordpress.org/trunk@44673


git-svn-id: http://core.svn.wordpress.org/trunk@44504 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Felix Arntz 2019-01-21 20:07:49 +00:00
parent 933c1fd23b
commit 3b7a01f1f2
2 changed files with 3 additions and 2 deletions

View File

@ -3293,7 +3293,8 @@ function _ajax_wp_die_handler( $message, $title = '', $args = array() ) {
list( $message, $title, $r ) = _wp_die_process_input( $message, $title, $args );
if ( ! headers_sent() && null !== $r['response'] ) {
// This is intentional. For backward-compatibility, support passing null here.
if ( ! headers_sent() && null !== $args['response'] ) {
status_header( $r['response'] );
}

View File

@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.1-beta1-44672';
$wp_version = '5.1-beta1-44673';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.