Opened 4 years ago
Closed 4 years ago
#8298 closed defect (bug) (fixed)
Deprecated: groups_send_membership_request
Reported by: | N33D | Owned by: | imath |
---|---|---|---|
Milestone: | 6.1.0 | Priority: | low |
Severity: | normal | Version: | 5.0.0 |
Component: | Templates | Keywords: | has-patch commit |
Cc: |
Description
Hi there,
There is a PHP file which I include in the group single page by using:
<?php function action_bp_after_group_header( ) { require_once(JV_SERVER_DIR .'/templates/partials/buddypress/group/single/group_actions.php'); }; add_action( 'bp_after_group_header', 'action_bp_after_group_header', 10, 0 );
In this file I call the following function:
<?php if ( groups_is_user_admin( $user_id, $group_id ) !== $group_id ): ?> <?php bp_group_join_button(); ?> <?php endif; ?>
Once clicked I get the following error:
Deprecated: groups_send_membership_request was called with an argument that is deprecated since version 5.0.0! Arguments passed to groups_send_membership_request should be in an associative array. See the inline documentation at /Users/****/Sites/mvp/wp-content/plugins/buddypress/bp-groups/bp-groups-functions.php for more details. in /Users/****/Sites/mvp/wp-includes/functions.php on line 4997 Warning: Cannot modify header information - headers already sent by (output started at /Users/****/Sites/mvp/wp-includes/functions.php:4997) in /Users/****/Sites/mvp/wp-includes/pluggable.php on line 1281 Warning: Cannot modify header information - headers already sent by (output started at /Users/****/Sites/mvp/wp-includes/functions.php:4997) in /Users/****/Sites/mvp/wp-includes/pluggable.php on line 1284
I use the latest version of WordPress and BuddyPress.
Though, the request was made and functionality is working.
Attachments (1)
Change History (5)
Note: See
TracTickets for help on using
tickets.
Thanks for the report, @N33D.
This is a relatively minor issue. You should turn off
WP_DEBUG
on your site so developer notices are not shown on your production site.As for the problem, changes were made as part of #6210 to deprecate the usage of function arguments for the
groups_send_membership_request()
function. See r12429.We still use the older function arguments in parts of the codebase. Attached patch should fix this.