From d7a6e63a9a21d74dc146cb8ddcdd0daca539559a Mon Sep 17 00:00:00 2001 From: Chris Smith Date: Fri, 11 Dec 2009 22:55:15 +0000 Subject: Correctly check for empty strings in custom profile fields. #55335 git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10324 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/functions_profile_fields.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'phpBB/includes/functions_profile_fields.php') diff --git a/phpBB/includes/functions_profile_fields.php b/phpBB/includes/functions_profile_fields.php index db1925bdcc..61e3587158 100644 --- a/phpBB/includes/functions_profile_fields.php +++ b/phpBB/includes/functions_profile_fields.php @@ -158,11 +158,11 @@ class custom_profile case FIELD_STRING: case FIELD_TEXT: - if (empty($field_value) && !$field_data['field_required']) + if (trim($field_value) === '' && !$field_data['field_required']) { return false; } - else if (empty($field_value) && $field_data['field_required']) + else if (trim($field_value) === '' && $field_data['field_required']) { return 'FIELD_REQUIRED'; } -- cgit v1.2.1