Add support for NULLs as user_birthday

This commit is contained in:
Yury Buldakov 2017-08-27 07:05:01 +03:00
commit 59916c9bf5
4 changed files with 8 additions and 7 deletions

View file

@ -587,7 +587,8 @@ $this_date = bb_date(TIMENOW, 'md', false);
for ($i = 0; $i < $total_posts; $i++) {
$poster_id = $postrow[$i]['user_id'];
$poster = ($poster_id == GUEST_UID) ? $lang['GUEST'] : $postrow[$i]['username'];
$poster_birthday = ($poster_id != GUEST_UID && $postrow[$i]['user_birthday'] != '0000-00-00') ? date('md', strtotime($postrow[$i]['user_birthday'])) : '';
$poster_birthday = ($poster_id != GUEST_UID && !empty($postrow[$i]['user_birthday']) && $postrow[$i]['user_birthday'] != '0000-00-00')
? date('md', strtotime($postrow[$i]['user_birthday'])) : '';
$post_date = bb_date($postrow[$i]['post_time'], $bb_cfg['post_date_format']);
$max_post_time = max($max_post_time, $postrow[$i]['post_time']);
$poster_posts = ($poster_id != GUEST_UID) ? $postrow[$i]['user_posts'] : '';