Skip to content

Commit

Permalink
Ensure variable is defined, to avoid notices or fatals.
Browse files Browse the repository at this point in the history
  • Loading branch information
boonebgorges committed Jul 17, 2024
1 parent 4807010 commit 252a1b2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions buddypress/groups/groups-loop.php
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ function ( $type ) {
}

// Exclude private groups if not current user's profile or don't have moderate access.
$private_groups = [];
if ( bp_is_user() ) {
$private_groups = openlab_get_user_private_memberships( bp_displayed_user_id() );
if ( ! bp_is_my_profile() && ! current_user_can( 'bp_moderate' ) ) {
Expand Down

0 comments on commit 252a1b2

Please sign in to comment.