Opened 10 years ago
Closed 10 years ago
#5871 closed defect (bug) (fixed)
bp_get_the_post_class() can generate an error if the groups component is deactivated
Reported by: | imath | Owned by: | imath |
---|---|---|---|
Milestone: | 2.1 | Priority: | normal |
Severity: | normal | Version: | 1.2 |
Component: | Core | Keywords: | has-patch commit |
Cc: |
Description
I think it's an edge case, but as it happened to me, i guess it can happen to someone else ;)
Steps to reproduce :
- Activate the groups component,
- Deactivate it
- go to site.url/groups (the page exists as it was created at step 1)
Fatal error due to bp_is_group()
check at line 2451 of bp-core-template.php
In bp_is_group() problem is due to the use of groups_get_current_group()
I think we should use bp_is_active( 'groups' )
in the bp_is_group()
function before trying to get the current group. See attached patch.
Attachments (1)
Change History (3)
Note: See
TracTickets for help on using
tickets.
Good catch, imath! I'd say this is commit-worthy.