[buddypress-trac] [BuddyPress Trac] #8702: php 8.0 warnings

buddypress-trac noreply at wordpress.org
Mon May 23 21:24:44 UTC 2022

#8702: php 8.0 warnings
 Reporter:  webmasterfreya           |       Owner:  (none)
     Type:  defect (bug)             |      Status:  reopened
 Priority:  low                      |   Milestone:  Awaiting Review
Component:  Core                     |     Version:  10.2.0
 Severity:  minor                    |  Resolution:
 Keywords:  needs-patch 2nd-opinion  |

Comment (by dcavins):

 I see what @webmasterfreya is saying, but unless the deprecated code file
 `2.5.php` is being loaded, I can't see how the action
 `do_action( 'bp_groups_sent_membership_request_email',
 $tokens['admin.id'], $email_subject, $email_content, $tokens['requesting-
 user.id'], $tokens['group.id'], $tokens['membership.id'] );`
 is being triggered.

 My doubt is that
 `* @param int    $membership_id      ID of the group membership object.`
 doesn't exist as it used to (it used to be the ID of the unconfirmed group
 membership row in `wp_bp_groups_members`, but unconfirmed requests are now
 stored in `wp_bp_invitations`).

 We could set the token `membership.id` in `bp_send_email( 'groups-
 membership-request', (int) $admin_id, $args );` to the ID from the
 `wp_bp_invitations` table, but code built for BP2.5 would misinterpret
 that number, so... I'm not sure what the best answer is. I'll attach a
 patch that restores the token, and updates the documentation in a couple
 of places.

 Here's the commit where I removed the membership.id token:

 Thanks for opening this odd ticket!

Ticket URL: <https://buddypress.trac.wordpress.org/ticket/8702#comment:6>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac

More information about the buddypress-trac mailing list