Skip to:
Content

BuddyPress.org

Changeset 9569


Ignore:
Timestamp:
02/28/2015 02:23:36 PM (9 years ago)
Author:
imath
Message:

Activity: in bp_has_activities() use bp_is_group() instead of groups_get_current_group()

Since r9536, bp_has_activities() is using the groups_get_current_group() function, which needs the Groups component to be active. There can be cases when this component has not been activated by the community administrator. In such cases, using this function is generating a fatal error. Using bp_is_group() is avoiding this error.

Fixes #6268

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-activity/bp-activity-template.php

    r9540 r9569  
    623623
    624624    // Group filtering
    625     if ( groups_get_current_group() ) {
     625    if ( bp_is_group() ) {
    626626        $object      = $bp->groups->id;
    627627        $primary_id  = bp_get_current_group_id();
Note: See TracChangeset for help on using the changeset viewer.