#7351 closed defect (bug) (fixed)
Empty date profile fields can return the epoch date
Reported by: | nickmomrik | Owned by: | djpaul |
---|---|---|---|
Milestone: | 2.7.3 | Priority: | normal |
Severity: | normal | Version: | 2.7.2 |
Component: | Extended Profile | Keywords: | has-patch |
Cc: |
Description
If you call something like
$date = bp_get_profile_field_data( array( 'user_id' => bp_get_member_user_id(), 'field' => $id ) );
and the user hasn't filled anything in the field, you get back '1970-01-01'
if you have 'Y-m-d'
as the field's date format.
Before 2.7 this returned an empty string.
Attachments (1)
Change History (7)
This ticket was mentioned in Slack in #buddypress by slaffik. View the logs.
8 years ago
#4
@
8 years ago
- Owner set to djpaul
- Resolution set to fixed
- Status changed from new to closed
In 11252:
This ticket was mentioned in Slack in #buddypress by djpaul. View the logs.
8 years ago
Note: See
TracTickets for help on using
tickets.
@nickmomrik Hi, I hope you're well. Thanks for the patch -- it's a good fix, and the issue is as you described.