Problem using an xProfile function
-
I recently got an error on the latest update because of my function:
function mn_member_short_description() { $args = array( 'field' => 'Short Description', // Field name or ID. ); if ($short_description = xprofile_get_field_data($args, bp_get_member_user_id())) { echo esc_html($short_description); } }
I got a notice:
Notice: Array to string conversion in /home/###/public_html/wp-content/plugins/buddypress/bp-core/bp-core-cache.php on line 320
The first parameter of the xprofile_get_field_data() in the BuddyPress file still says the first paramater can be a mixed parameter.
Nevertheless, I fixed my function by changing the args array to a sting:
xprofile_get_field_data('Short Description', bp_get_member_user_id());
.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- You must be logged in to reply to this topic.