Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check the xProfile group is not empty before trying to get field ids #140

Closed
wants to merge 1 commit into from

Conversation

imath
Copy link
Member

@imath imath commented Jul 26, 2023

Prevent potential errors in bp_get_the_profile_field_ids().

Trac ticket: https://buddypress.trac.wordpress.org/ticket/8789


This Pull Request is for code review only. Please keep all other discussion in the BuddyPress Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the WordPress Core Handbook for more details.

@dcavins
Copy link
Contributor

dcavins commented Jul 26, 2023

I love the unit tests. 👯‍♀️

@imath imath deleted the patch/8789 branch July 27, 2023 10:50
dcavins pushed a commit to dcavins/buddypress-wp-svn that referenced this pull request Jul 28, 2023
In case this function is used inside an xProfile group loop having no attached profile fields, instead of generating a notice error, let's simply return an empty string.

Props shawfactor

Fixes #8789
Closes buddypress/buddypress#140



git-svn-id: http://buddypress.svn.wordpress.org/trunk@13528 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants