Make WordPress Core


Ignore:
Timestamp:
11/07/2012 08:03:28 PM (13 years ago)
Author:
ryan
Message:

Don't assign wp_the_query to wp_query by reference. Removing the ref avoids accidentally stomping wp_the_query.

Props scribu, wpmuguru
fixes #22125

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/query.php

    r22428 r22434  
    8888 */
    8989function query_posts($query) {
    90     unset($GLOBALS['wp_query']);
    9190    $GLOBALS['wp_query'] = new WP_Query();
    9291    return $GLOBALS['wp_query']->query($query);
     
    104103 */
    105104function wp_reset_query() {
    106     unset($GLOBALS['wp_query']);
    107105    $GLOBALS['wp_query'] = $GLOBALS['wp_the_query'];
    108106    wp_reset_postdata();
Note: See TracChangeset for help on using the changeset viewer.