Skip to:
Content

BuddyPress.org

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#7351 closed defect (bug) (fixed)

Empty date profile fields can return the epoch date

Reported by: nickmomrik's profile nickmomrik Owned by: djpaul's profile 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)

empty-profile-date.diff (579 bytes) - added by nickmomrik 8 years ago.

Download all attachments as: .zip

Change History (7)

#1 @DJPaul
8 years ago

  • Milestone changed from Awaiting Review to 2.7.3

This ticket was mentioned in Slack in #buddypress by slaffik. View the logs.


8 years ago

#3 @DJPaul
8 years ago

@nickmomrik Hi, I hope you're well. Thanks for the patch -- it's a good fix, and the issue is as you described.

#4 @djpaul
8 years ago

  • Owner set to djpaul
  • Resolution set to fixed
  • Status changed from new to closed

In 11252:

xprofile: fix valueless datebox profile fields erroneously returning the unix epoch.

Fixes #7351 (branch 2.7)

Props nickmomrik

#5 @djpaul
8 years ago

In 11253:

xprofile: fix valueless datebox profile fields erroneously returning the unix epoch.

Fixes #7351

Props nickmomrik

This ticket was mentioned in Slack in #buddypress by djpaul. View the logs.


8 years ago

Note: See TracTickets for help on using tickets.