From 57bbb4548b2761c01fc14345982e00be1ea27af1 Mon Sep 17 00:00:00 2001 From: Stanislav Atanasov Date: Thu, 10 Jul 2014 06:12:13 +0300 Subject: [PATCH] [ticket/12793] String '0' does not display for string profile fields See https://github.com/phpbb/phpbb/pull/2647#discussion_r14503051 PHPBB3-12793 --- phpBB/phpbb/profilefields/type/type_string_common.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/phpBB/phpbb/profilefields/type/type_string_common.php b/phpBB/phpbb/profilefields/type/type_string_common.php index c2b951b6c9..0842675a11 100644 --- a/phpBB/phpbb/profilefields/type/type_string_common.php +++ b/phpBB/phpbb/profilefields/type/type_string_common.php @@ -98,7 +98,7 @@ abstract class type_string_common extends type_base */ public function get_profile_value($field_value, $field_data) { - if (!$field_value && !$field_data['field_show_novalue']) + if (($field_value === null || $field_value === '') && !$field_data['field_show_novalue']) { return null; } @@ -114,7 +114,7 @@ abstract class type_string_common extends type_base */ public function get_profile_value_raw($field_value, $field_data) { - if (!$field_value && !$field_data['field_show_novalue']) + if (($field_value === null || $field_value === '') && !$field_data['field_show_novalue']) { return null; } @@ -127,7 +127,7 @@ abstract class type_string_common extends type_base */ public function get_profile_contact_value($field_value, $field_data) { - if (!$field_value && !$field_data['field_show_novalue']) + if (($field_value === null || $field_value === '') && !$field_data['field_show_novalue']) { return null; }