mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
correct birthday value (int -> string)
git-svn-id: file:///svn/phpbb/trunk@7176 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
355c62cd3c
commit
9d78487f96
1 changed files with 4 additions and 4 deletions
|
@ -400,18 +400,16 @@ function phpbb_set_default_encoding($text)
|
||||||
*/
|
*/
|
||||||
function phpbb_get_birthday($birthday = '')
|
function phpbb_get_birthday($birthday = '')
|
||||||
{
|
{
|
||||||
$birthday = (int) $birthday;
|
|
||||||
|
|
||||||
if (defined('MOD_BIRTHDAY_TERRA'))
|
if (defined('MOD_BIRTHDAY_TERRA'))
|
||||||
{
|
{
|
||||||
|
$birthday = (string) $birthday;
|
||||||
|
|
||||||
// stored as month, day, year
|
// stored as month, day, year
|
||||||
if (!$birthday)
|
if (!$birthday)
|
||||||
{
|
{
|
||||||
return ' 0- 0- 0';
|
return ' 0- 0- 0';
|
||||||
}
|
}
|
||||||
|
|
||||||
$birthday = (string) $birthday;
|
|
||||||
|
|
||||||
$month = substr($birthday, 0, 2);
|
$month = substr($birthday, 0, 2);
|
||||||
$day = substr($birthday, 2, 2);
|
$day = substr($birthday, 2, 2);
|
||||||
$year = substr($birthday, -4);
|
$year = substr($birthday, -4);
|
||||||
|
@ -420,6 +418,8 @@ function phpbb_get_birthday($birthday = '')
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
$birthday = (int) $birthday;
|
||||||
|
|
||||||
if (!$birthday || $birthday == 999999 || $birthday < 0)
|
if (!$birthday || $birthday == 999999 || $birthday < 0)
|
||||||
{
|
{
|
||||||
return ' 0- 0- 0';
|
return ' 0- 0- 0';
|
||||||
|
|
Loading…
Add table
Reference in a new issue