#3630 closed defect (bug) (fixed)
Date Selector Bug
| Reported by: | ken_k | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | 1.5.2 |
| Component: | Core | Version: | 1.5 |
| Severity: | minor | 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)
#2
@
15 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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
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.