aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Fischer <bantu@phpbb.com>2011-05-08 21:31:19 +0200
committerAndreas Fischer <bantu@phpbb.com>2011-05-08 21:31:19 +0200
commita072526890a5ebbe363f57f31f9c516a9a416883 (patch)
treeffa2d81b51140625821e5327af9ca8897dd856bd
parent6a7d7285fbee7fd7838f1bf45e631cb3307ac514 (diff)
downloadforums-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.php6
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);
}