[buddypress-trac] [BuddyPress Trac] #6443: Cannot have "0" as XProfile field option

buddypress-trac noreply at wordpress.org
Tue May 19 17:02:12 UTC 2015


#6443: Cannot have "0" as XProfile field option
----------------------------------+------------------
 Reporter:  johnjamesjacoby       |       Owner:
     Type:  defect (bug)          |      Status:  new
 Priority:  normal                |   Milestone:  2.3
Component:  Component - XProfile  |     Version:  2.2
 Severity:  normal                |  Resolution:
 Keywords:  has-patch             |
----------------------------------+------------------

Comment (by johnjamesjacoby):

 In [changeset:"9879"]:
 {{{
 #!CommitTicketReference repository="" revision="9879"
 XProfile: Improve field validation in
 `BP_Profile_Field::admin_validate()`.

 * Break inline conditions apart into multiple specific ones to improve
 logical flow of field validation
 * Introduce more helpful `$message` feedback for each new condition,
 including the field-type name where possible
 * Replace `empty()` checks with `! isset()` to allow "0" values as names
 and options
 * Remove `field_file` check, as the "file" field type was removed when
 avatar uploads were refactored in 1.0
 * Much more appropriate field-option validation using
 `sanitize_text_field` to
 * Properly escape gettext output
 * Tests introduced in r9878

 See #6443.
 }}}

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


More information about the buddypress-trac mailing list