[buddypress-trac] [BuddyPress Trac] #6082: Incorrect results from xprofile_get_field_id_from_name( $field_name )

buddypress-trac noreply at wordpress.org
Fri Jan 9 05:48:39 UTC 2015


#6082: Incorrect results from xprofile_get_field_id_from_name( $field_name )
----------------------------------------+---------------------
 Reporter:  dontdream                   |       Owner:  r-a-y
     Type:  defect (bug)                |      Status:  closed
 Priority:  normal                      |   Milestone:  2.2
Component:  XProfile                    |     Version:  2.1
 Severity:  normal                      |  Resolution:  fixed
 Keywords:  has-patch needs-unit-tests  |
----------------------------------------+---------------------
Changes (by r-a-y):

 * owner:   => r-a-y
 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"9324"]:
 {{{
 #!CommitTicketReference repository="" revision="9324"
 XProfile: Make sure `xprofile_get_field_id_from_name()` returns a field ID
 for a field name.

 Previously, when using `xprofile_get_field_id_from_name()`, it was
 possible
 to get the option ID instead of the desired field ID because a field name
 and an option value (for a checkbox or radio field) can potentially be the
 the same in the `wp_bp_xprofile_fields` DB table.

 This commit ensures that field name look ups will return a field ID
 instead
 of an option ID.  Commit also includes a unit test.

 Props dontdream.

 Fixes #6082.
 }}}

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


More information about the buddypress-trac mailing list