Skip to:
Content

bbPress.org


Ignore:
Timestamp:
02/18/2011 10:38:31 AM (15 years ago)
Author:
johnjamesjacoby
Message:

Prevent fatal error on WordPress 3.0 installs from $wp_query not being setup before this loop is created.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/plugin/bbp-includes/bbp-topic-template.php

    r2914 r2915  
    6262 */
    6363function bbp_has_topics( $args = '' ) {
    64     global $wp_rewrite, $bbp, $wpdb;
     64    global $wp_rewrite, $wp_query, $bbp, $wpdb;
    6565
    6666    $default = array (
     
    111111
    112112    // If we're viewing a tax/term, use the existing query; if not, run our own
    113     if ( !is_tax() ) {
     113    if ( !isset( $wp_query ) || !is_tax() )
    114114        $bbp->topic_query = new WP_Query( $bbp_t );
    115     } else {
    116         global $wp_query;
     115    else
    117116        $bbp->topic_query = $wp_query;
    118     }
    119117
    120118    // Limited the number of pages shown
Note: See TracChangeset for help on using the changeset viewer.