diff --git a/phpBB/index.php b/phpBB/index.php index 3b58646af0..91cbd326b9 100644 --- a/phpBB/index.php +++ b/phpBB/index.php @@ -99,7 +99,7 @@ if ($config['load_birthdays'] && $config['allow_birthdays']) if ($age = (int) substr($row['user_birthday'], -4)) { - $birthday_list .= ' (' . ($now['year'] - $age) . ')'; + $birthday_list .= ' (' . max(0, $now['year'] - $age) . ')'; } } $db->sql_freeresult($result); diff --git a/phpBB/memberlist.php b/phpBB/memberlist.php index 351759fcbd..8169ee7a3e 100644 --- a/phpBB/memberlist.php +++ b/phpBB/memberlist.php @@ -1697,7 +1697,7 @@ function show_profile($data, $user_notes_enabled = false, $warn_user_enabled = f $diff = ($diff < 0) ? 1 : 0; } - $age = (int) ($now['year'] - $bday_year - $diff); + $age = max(0, (int) ($now['year'] - $bday_year - $diff)); } } diff --git a/phpBB/styles/prosilver/template/memberlist_view.html b/phpBB/styles/prosilver/template/memberlist_view.html index 031bfec6ff..3398bb5e9e 100644 --- a/phpBB/styles/prosilver/template/memberlist_view.html +++ b/phpBB/styles/prosilver/template/memberlist_view.html @@ -28,7 +28,7 @@