From 5eba2a13d8e0f90130ecb5fc6ede26c6cdba3a4c Mon Sep 17 00:00:00 2001 From: Nikolay Bachiyski Date: Wed, 22 Jan 2014 08:24:50 +0000 Subject: [PATCH] Explicitly globalize some missing query globals in wp-settings.php When WordPress is loaded in a function (e.g. unit tests) the variables initialized at the top level aren't globals, but we expect them to be. Fixes #26867 git-svn-id: https://develop.svn.wordpress.org/trunk@26996 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-settings.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/wp-settings.php b/src/wp-settings.php index 40d3a61e1a..7898fb59b9 100644 --- a/src/wp-settings.php +++ b/src/wp-settings.php @@ -248,7 +248,7 @@ do_action( 'sanitize_comment_cookies' ); * @global object $wp_the_query * @since 2.0.0 */ -$wp_the_query = new WP_Query(); +$GLOBALS['wp_the_query'] = new WP_Query(); /** * Holds the reference to @see $wp_the_query @@ -256,7 +256,7 @@ $wp_the_query = new WP_Query(); * @global object $wp_query * @since 1.5.0 */ -$wp_query = $wp_the_query; +$GLOBALS['wp_query'] = $GLOBALS['wp_the_query']; /** * Holds the WordPress Rewrite object for creating pretty URLs @@ -270,7 +270,7 @@ $GLOBALS['wp_rewrite'] = new WP_Rewrite(); * @global object $wp * @since 2.0.0 */ -$wp = new WP(); +$GLOBALS['wp'] = new WP(); /** * WordPress Widget Factory Object