#7351 closed defect (bug) (fixed)
Empty date profile fields can return the epoch date
| Reported by: | nickmomrik | Owned by: | djpaul |
|---|---|---|---|
| Priority: | normal | Milestone: | 2.7.3 |
| Component: | Extended Profile | Version: | 2.7.2 |
| Severity: | normal | 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.
10 years ago
This ticket was mentioned in Slack in #buddypress by djpaul. View the logs.
10 years ago
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
@nickmomrik Hi, I hope you're well. Thanks for the patch -- it's a good fix, and the issue is as you described.