[buddypress-trac] [BuddyPress Trac] #7300: xprofile date field year regression on existing fields

buddypress-trac noreply at wordpress.org
Sun Oct 23 10:30:02 UTC 2016

#7300: xprofile date field year regression on existing fields
 Reporter:  DJPaul            |       Owner:
     Type:  defect (bug)      |      Status:  new
 Priority:  high              |   Milestone:  2.7.1
Component:  Extended Profile  |     Version:
 Severity:  major             |  Resolution:
 Keywords:                    |

Comment (by DJPaul):

 Because existing fields do not have the new meta properties set, the
 requested field values were being returned from meta as a empty string,
 not a boolean false, and the type strictness of this check caused the
 value to be set to that empty string, not from the defaults array.

 This contradicts our PHPDoc block for `bp_xprofile_get_meta` which says it
 returns a boolean false if the request value is not set... which is how
 WP's https://codex.wordpress.org/Function_Reference/get_user_meta works,
 so we probably need to go through all our custom meta functions, fix the
 docblocks, and check other instances we might be handling type strict.
 This second part itself should be its own ticket, but I want confirmation
 that I've looked at this correctly first. :)

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

More information about the buddypress-trac mailing list