From 42b9c3c479a28ba74c214676a17e7e783150e227 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Mon, 2 Sep 2013 01:11:40 +0200 Subject: [PATCH] [ticket/11769] Allow '0' as username PHPBB3-11769 --- phpBB/includes/functions_posting.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php index 32206df868..11a5067ef9 100644 --- a/phpBB/includes/functions_posting.php +++ b/phpBB/includes/functions_posting.php @@ -2607,7 +2607,7 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u // If a username was supplied or the poster is a guest, we will use the supplied username. // Doing it this way we can use "...post by guest-username..." in notifications when // "guest-username" is supplied or ommit the username if it is not. - $username = ($username || !$user->data['is_registered']) ? $username : $user->data['username']; + $username = ($username !== '' || !$user->data['is_registered']) ? $username : $user->data['username']; user_notification($mode, $subject, $data['topic_title'], $data['forum_name'], $data['forum_id'], $data['topic_id'], $data['post_id'], $username); }