Skip to:
Content

BuddyPress.org

Opened 14 years ago

Closed 14 years ago

#3481 closed defect (bug) (fixed)

Group extension PHP warning when visibility != 'public'

Reported by: boonebgorges's profile boonebgorges Owned by:
Milestone: 1.5 Priority: minor
Severity: minor Version:
Component: Groups Keywords:
Cc:

Description

In BP_Group_Extension::register(), you get a PHP warning if the tab visibility is not set to public and you look at a non-group page. That's because we check $bp->groups>current_group->user_has_access, which will not be populated when you're not looking at a specific group.

More generally, we don't need to be adding nav items to the group nav if we're not looking at a single group (and in fact, we are not doing so - currently there are a bunch of is_single_item checks). I'm going to move them all into a single bp_is_group() wrapper that will be more efficient and also solve the PHP warning.

Change History (1)

#1 @boonebgorges
14 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [4983]) In BP_Group_Extension::register(), only check to see if we're looking at a single group once, and do it early enough to avoid potential PHP errors related to tab visibility. Fixes #3481

Note: See TracTickets for help on using tickets.