mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-12 04:40:26 +00:00
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. git-svn-id: https://develop.svn.wordpress.org/trunk@45206 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -274,6 +274,18 @@ class Tests_TestHelpers extends WP_UnitTestCase {
|
||||
wp_die( new WP_Error( 'test', 'test' ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* @ticket 46813
|
||||
* @expectedException WPDieException
|
||||
*/
|
||||
public function test_die_handler_should_not_cause_doing_it_wrong_notice_without_wp_query_set() {
|
||||
unset( $GLOBALS['wp_query'] );
|
||||
|
||||
wp_die();
|
||||
|
||||
$this->assertEmpty( $this->caught_doing_it_wrong );
|
||||
}
|
||||
|
||||
/**
|
||||
* @ticket 45933
|
||||
* @dataProvider data_die_process_input
|
||||
|
||||
Reference in New Issue
Block a user