Changeset 45206
- Timestamp:
- 04/15/2019 11:48:11 PM (6 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/functions.php
r45185 r45206 2946 2946 * @since 5.1.0 The `$link_url`, `$link_text`, and `$exit` arguments were added. 2947 2947 * 2948 * @global WP_Query $wp_query Global WP_Query instance. 2949 * 2948 2950 * @param string|WP_Error $message Optional. Error message. If this is a WP_Error object, 2949 2951 * and not an Ajax or XML-RPC request, the error's messages are used. … … 2972 2974 */ 2973 2975 function wp_die( $message = '', $title = '', $args = array() ) { 2976 global $wp_query; 2974 2977 2975 2978 if ( is_int( $args ) ) { … … 3017 3020 $function = apply_filters( 'wp_die_xmlrpc_handler', '_xmlrpc_wp_die_handler' ); 3018 3021 } elseif ( wp_is_xml_request() 3019 || function_exists( 'is_feed' ) && is_feed() 3020 || function_exists( 'is_comment_feed' ) && is_comment_feed() 3021 || function_exists( 'is_trackback' ) && is_trackback() ) { 3022 || isset( $wp_query ) && 3023 ( function_exists( 'is_feed' ) && is_feed() 3024 || function_exists( 'is_comment_feed' ) && is_comment_feed() 3025 || function_exists( 'is_trackback' ) && is_trackback() ) ) { 3022 3026 /** 3023 3027 * Filters the callback for killing WordPress execution for XML requests. -
trunk/tests/phpunit/tests/includes/helpers.php
r44690 r45206 276 276 277 277 /** 278 * @ticket 46813 279 * @expectedException WPDieException 280 */ 281 public function test_die_handler_should_not_cause_doing_it_wrong_notice_without_wp_query_set() { 282 unset( $GLOBALS['wp_query'] ); 283 284 wp_die(); 285 286 $this->assertEmpty( $this->caught_doing_it_wrong ); 287 } 288 289 /** 278 290 * @ticket 45933 279 291 * @dataProvider data_die_process_input
Note: See TracChangeset
for help on using the changeset viewer.