WordPress.org

Make WordPress Core

Changeset 26996


Ignore:
Timestamp:
01/22/2014 08:24:50 AM (7 years ago)
Author:
nbachiyski
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-settings.php

    r26008 r26996  
    249249 * @since 2.0.0
    250250 */
    251 $wp_the_query = new WP_Query();
     251$GLOBALS['wp_the_query'] = new WP_Query();
    252252
    253253/**
     
    257257 * @since 1.5.0
    258258 */
    259 $wp_query = $wp_the_query;
     259$GLOBALS['wp_query'] = $GLOBALS['wp_the_query'];
    260260
    261261/**
     
    271271 * @since 2.0.0
    272272 */
    273 $wp = new WP();
     273$GLOBALS['wp'] = new WP();
    274274
    275275/**
Note: See TracChangeset for help on using the changeset viewer.