From 80af25060b66e23370dd34591307a1b6185bd874 Mon Sep 17 00:00:00 2001 From: Nikolay Bachiyski Date: Wed, 22 Jan 2014 08:25:12 +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 Built from https://develop.svn.wordpress.org/trunk@26996 git-svn-id: http://core.svn.wordpress.org/trunk@26873 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-settings.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wp-settings.php b/wp-settings.php index 40d3a61e1a..7898fb59b9 100644 --- a/wp-settings.php +++ b/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