Changeset 13309
- Timestamp:
- 08/08/2022 09:24:03 PM (2 years ago)
- Location:
- trunk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-activity/bp-activity-cache.php
r13149 r13309 50 50 51 51 // Clear the comments cache for the parent activity ID. 52 if ( 'activity_comment' === $activity->type ) {52 if ( 'activity_comment' === $activity->type && ! empty( $activity->item_id ) ) { 53 53 wp_cache_delete( $activity->item_id, 'bp_activity_comments' ); 54 54 } -
trunk/src/bp-activity/bp-activity-functions.php
r13305 r13309 2064 2064 2065 2065 // If this is an activity comment, rebuild the tree. 2066 if ( 'activity_comment' === $activity->type ) {2066 if ( 'activity_comment' === $activity->type && ! empty( $activity->item_id ) ) { 2067 2067 // Also clear the comment cache for the parent activity ID. 2068 2068 wp_cache_delete( $activity->item_id, 'bp_activity_comments' ); -
trunk/src/bp-groups/bp-groups-cache.php
r12429 r13309 250 250 function bp_groups_clear_user_group_cache_on_membership_save( BP_Groups_Member $member ) { 251 251 wp_cache_delete( $member->user_id, 'bp_groups_memberships_for_user' ); 252 wp_cache_delete( $member->id, 'bp_groups_memberships' ); 252 253 if ( ! is_null( $member->id ) ) { 254 wp_cache_delete( $member->id, 'bp_groups_memberships' ); 255 } 253 256 } 254 257 add_action( 'groups_member_before_save', 'bp_groups_clear_user_group_cache_on_membership_save' ); -
trunk/src/bp-groups/bp-groups-functions.php
r13280 r13309 3248 3248 } 3249 3249 3250 $group_id = (int) $group_id; 3251 if ( ! $group_id ) { 3252 return false; 3253 } 3254 3250 3255 // Get all group's group types. 3251 3256 $types = bp_groups_get_group_type( $group_id, false ); -
trunk/src/bp-members/bp-members-functions.php
r13293 r13309 3266 3266 // Bail if no valid member type was passed. 3267 3267 if ( empty( $member_type ) || ! bp_get_member_type_object( $member_type ) ) { 3268 return false; 3269 } 3270 3271 $user_id = (int) $user_id; 3272 if ( ! $user_id ) { 3268 3273 return false; 3269 3274 } -
trunk/tests/phpunit/testcases/groups/types.php
r12731 r13309 196 196 bp_groups_register_group_type( 'foo' ); 197 197 198 $this->assertFalse( bp_groups_has_group_type( '', 'foo' ) );198 $this->assertFalse( bp_groups_has_group_type( 0, 'foo' ) ); 199 199 } 200 200 -
trunk/tests/phpunit/testcases/members/types.php
r13239 r13309 374 374 bp_register_member_type( 'foo' ); 375 375 376 $this->assertFalse( bp_has_member_type( '', 'foo' ) );376 $this->assertFalse( bp_has_member_type( 0, 'foo' ) ); 377 377 } 378 378
Note: See TracChangeset
for help on using the changeset viewer.