[buddypress-trac] [BuddyPress Trac] #7337: PHP Fatal error: Uncaught Error: Call to a member function get_do_autolink() on null

buddypress-trac noreply at wordpress.org
Wed Mar 29 20:22:30 UTC 2017


#7337: PHP Fatal error:  Uncaught Error: Call to a member function
get_do_autolink() on null
--------------------------------------------------------+------------------
 Reporter:  slaFFik                                     |       Owner:
     Type:  defect (bug)                                |      Status:  new
 Priority:  normal                                      |   Milestone:  2.9
Component:  Extended Profile                            |     Version:
 Severity:  normal                                      |  Resolution:
 Keywords:  dev-feedback 2nd-opinion early needs-patch  |
--------------------------------------------------------+------------------
Changes (by r-a-y):

 * keywords:  dev-feedback, has-patch, 2nd-opinion, early => dev-feedback
     2nd-opinion early needs-patch


Comment:

 I agree with Paul.  The current patch doesn't change how the
 `xprofile_filter_link_profile_data()` function works.

 @slaFFik - I would rework the patch so we add a third parameter -
 `$field_id` - to `xprofile_filter_link_profile_data()`.  This is so the
 `'bp_get_the_profile_field_value'` filter will continue to work as-is.

 Then instead of looking at the `$field` global in the
 `xprofile_filter_link_profile_data()` function, we do `$field =
 xprofile_get_field( $field_id );`.

 Then in your custom AJAX call, you could do this:
 `xprofile_filter_link_profile_data( $field_value, $field_data['type'],
 $field_id )`

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/7337#comment:8>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list