1
0
Fork 0

More general date test for dob

This commit is contained in:
Alexandre Alapetite 2017-04-16 15:36:01 +02:00
parent 62768a1bb4
commit c35eef625a

View file

@ -201,7 +201,7 @@ function profiles_post(App $a) {
} else {
$ignore_year = false;
}
if ($dob > '0001-01-01') {
if (!in_array($dob, array('0000-00-00', '0001-01-01'))) {
if (strpos($dob, '0000-') === 0 || strpos($dob, '0001-') === 0) {
$ignore_year = true;
$dob = substr($dob, 5);