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:
@@ -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'] );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user