Opened 14 years ago
Closed 14 years ago
#4582 closed defect (bug) (wontfix)
Error in data birthday user
| Reported by: | albgonzalez13 | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Core | Version: | 1.6.1 |
| Severity: | normal | 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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
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.