Skip to:
Content

bbPress.org


Ignore:
Timestamp:
06/23/2013 07:00:11 AM (13 years ago)
Author:
johnjamesjacoby
Message:

Replace generic stdClass usages with correct object types.

Fixes debug notices with bbp_get_displayed_user_field() when requesting non-existing fields or when there is no displayed user, by allowing the magic get() methods of the WP_User class to bail if the field is not set.

Also prevents similar issues with main query loops. Fixes #2359.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/includes/common/shortcodes.php

    r4971 r4996  
    120120
    121121        // Unset global queries
    122         $bbp->forum_query  = new stdClass;
    123         $bbp->topic_query  = new stdClass;
    124         $bbp->reply_query  = new stdClass;
    125         $bbp->search_query = new stdClass;
     122        $bbp->forum_query  = new WP_Query();
     123        $bbp->topic_query  = new WP_Query();
     124        $bbp->reply_query  = new WP_Query();
     125        $bbp->search_query = new WP_Query();
    126126
    127127        // Unset global ID's
Note: See TracChangeset for help on using the changeset viewer.