Skip to:
Content

BuddyPress.org

Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#3630 closed defect (bug) (fixed)

Date Selector Bug

Reported by: ken_k's profile ken_k Owned by:
Milestone: 1.5.2 Priority: normal
Severity: minor Version: 1.5
Component: Core Keywords: has-patch commit
Cc:

Description

If you put a date selector in the Base profile and even though is set to required, can be bypassed during registration.

Attachments (1)

3630.01.patch (875 bytes) - added by boonebgorges 13 years ago.

Download all attachments as: .zip

Change History (7)

#1 @boonebgorges
13 years ago

  • Milestone changed from Awaiting Review to 1.5.1
  • Severity changed from normal to minor

Confirmed. The problem is that when you don't fill out the date selector, BP converts your null response to the (MySQL equivalent of) the UNIX epoch, so that WP thinks it's filled out. About to post a suggested solution.

#2 @boonebgorges
13 years ago

  • Keywords has-patch added

3630.01.patch is a quick fix. It does two things:

  • Switches isset() to !empty(). Previously, isset() always returned true, because the submitted dropdown passed an empty string as the value.
  • Checks to see that day, month, and year are all filled out, instead of just the day. Since we are setting the saved value using date(), we really should be requiring all three fields anyway. (I think there is a good argument for *not* requiring all three fields, but that would require a different method for saving stuff, and would be a future enhancement.)

If people are cool with this fix, I'll copy the logic over to the profile edit functions too (they're processed separately from registration fields).

#3 @DJPaul
13 years ago

  • Keywords commit added

Looks good

#4 @johnjamesjacoby
13 years ago

Looks okay to me.

#5 @boonebgorges
13 years ago

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

(In [5268]) Don't allow date-formatted xprofile fields to be saved if they're only partially filled in. Fixes #3630

#6 @boonebgorges
13 years ago

(In [5269]) Don't allow date-formatted xprofile fields to be saved if they're only partially filled in. Fixes #3630

Note: See TracTickets for help on using tickets.