Opened 14 years ago
Closed 14 years ago
#3481 closed defect (bug) (fixed)
Group extension PHP warning when visibility != 'public'
Reported by: |
|
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.
(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