Make WordPress Core


Ignore:
Timestamp:
04/15/2019 11:48:11 PM (6 years ago)
Author:
SergeyBiryukov
Message:

Bootstrap/Load: After [45016], make sure wp_die() does not cause _doing_it_wrong() notices if called before $wp_query global is set.

Props tmdesigned, TimothyBlynJacobs.
Fixes #46813.

File:
1 edited

Legend:

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

    r44690 r45206  
    276276
    277277    /**
     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    /**
    278290     * @ticket 45933
    279291     * @dataProvider data_die_process_input
Note: See TracChangeset for help on using the changeset viewer.