@vapvarun thanks, wasn’t really clear what the fix entails, so for anyone else looking for a solution, it took me 10 minutes to find the link on where I could find the fix.
You have to modify the following file /wp-content/plugins/buddypress/bp-members/screens/register.php
on line 93
and change
// $_POST[ 'field_' . $field_id ] = trim( $_POST[ 'field_' . $field_id ] );
to
if ( is_array( $_POST[ 'field_' . $field_id ] ) ) {
$_POST[ 'field_' . $field_id ] = array_map( 'trim', $_POST[ 'field_' . $field_id ] );
} else {
$_POST[ 'field_' . $field_id ] = trim( $_POST[ 'field_' . $field_id ] );
}
See the page and check for the link 7845.01.patch
or go to https://buddypress.trac.wordpress.org/attachment/ticket/7845/7845.01.patch
I had the same problem and was following the fix too, but I made a copy of that file in my child theme under my-theme-name/buddypress/bp-members/screens/register.php. I didn’t want to change it in the original plugin file, but it’s not working. Is modifying the original plugin file ok? I’m not sure why my copied version in my child theme isn’t working??
Child theme overloads are only for template files.
Modifying core files is not a good idea – but in this case it is the only option.
And the next release will include the patch – so your changes are just a temporary kludge.