#3630 closed defect (bug) (fixed)
Date Selector Bug
Reported by: | 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)
Change History (7)
#1
@
13 years ago
- Milestone changed from Awaiting Review to 1.5.1
- Severity changed from normal to minor
#2
@
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).
Note: See
TracTickets for help on using
tickets.
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.