diff options
author | Andreas Fischer <bantu@phpbb.com> | 2011-05-08 21:31:19 +0200 |
---|---|---|
committer | Andreas Fischer <bantu@phpbb.com> | 2011-05-08 21:31:19 +0200 |
commit | a072526890a5ebbe363f57f31f9c516a9a416883 (patch) | |
tree | ffa2d81b51140625821e5327af9ca8897dd856bd | |
parent | 6a7d7285fbee7fd7838f1bf45e631cb3307ac514 (diff) | |
download | forums-a072526890a5ebbe363f57f31f9c516a9a416883.tar forums-a072526890a5ebbe363f57f31f9c516a9a416883.tar.gz forums-a072526890a5ebbe363f57f31f9c516a9a416883.tar.bz2 forums-a072526890a5ebbe363f57f31f9c516a9a416883.tar.xz forums-a072526890a5ebbe363f57f31f9c516a9a416883.zip |
[ticket/10173] Only calculate age if year is not false as per nn-.
PHPBB3-10173
-rw-r--r-- | phpBB/index.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/phpBB/index.php b/phpBB/index.php index 62c229f0b5..5d62cb1071 100644 --- a/phpBB/index.php +++ b/phpBB/index.php @@ -98,15 +98,15 @@ if ($config['load_birthdays'] && $config['allow_birthdays']) { $birthday_username = get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']); $birthday_year = (int) substr($row['user_birthday'], -4); - $birthday_age = $now['year'] - $birthday_year; + $birthday_age = ($birthday_year) ? $now['year'] - $birthday_year : ''; $template->assign_block_vars('birthdays', array( 'USERNAME' => $birthday_username, - 'AGE' => ($birthday_year) ? $birthday_age : '', + 'AGE' => $birthday_age, )); // For 3.0 compatibility - $birthday_list[] = $birthday_username . (($birthday_year) ? ' (' . $birthday_age . ')' : ''); + $birthday_list[] = $birthday_username . (($birthday_age) ? ' (' . $birthday_age . ')' : ''); } $db->sql_freeresult($result); } |