diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html
index 00f239f6b4..846c71f738 100644
--- a/phpBB/docs/CHANGELOG.html
+++ b/phpBB/docs/CHANGELOG.html
@@ -113,6 +113,7 @@
[Fix] Restore user language choice to compiled stylesheets. (Bug #54035)
[Fix] Add missing language entries. (Bug #55095)
[Fix] Do not permit unauthorised users to delete private messages from folder listing. (Bug #54355)
+ [Fix] Correctly check for empty strings in custom profile fields. (Bug #55335)
[Change] Log activation through inactive users ACP. (Bug #30145)
[Change] Send time of last item instead of current time in ATOM Feeds. (Bug #53305)
[Change] Use em dash instead of hyphen/minus as separator in ATOM Feeds item statistics. (Bug #53565)
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';
}