Opened 12 years ago
Closed 12 years ago
#4582 closed defect (bug) (wontfix)
Error in data birthday user
Reported by: | albgonzalez13 | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 1.6.1 |
Component: | Core | Keywords: | has-patch |
Cc: |
Description
Hello, I found an error in the birth date BuddyPress. This error has a quick solution.
The error is in line 692 to 695 of file bp-xprofile-template.php.
for ( $i = 2037; $i > 1901; $i-- ) { $html .= '<option value="' . $i .'"' . selected( $year, $i, false ) . '>' . $i . '</option>'; } break;
These lines should be replaced by:
$anyo = date('Y'); for ( $i = $anyo; $i > 1901; $i-- ) { $html .= '<option value="' . $i .'"' . selected( $year, $i, false ) . '>' . $i . '</option>'; } break;
Change History (1)
Note: See
TracTickets for help on using
tickets.
This is actually intentional. The date field isn't meant to be specifically for birthday dates; it can be used for anything. We do want to look at different types of profile fields in a future release, and as an example, a "birthday field" sounds reasonable.
If anyone's interested in why the upper year limit is 2037, it's to do with the Year 2038 problem minus a little for safety in case someone performs date calculations which go into January 2038.