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
This commit is contained in:
Chris Smith 2009-12-11 22:55:15 +00:00
parent 44b9dfaff5
commit d7a6e63a9a
2 changed files with 3 additions and 2 deletions

View file

@ -113,6 +113,7 @@
<li>[Fix] Restore user language choice to compiled stylesheets. (Bug #54035)</li>
<li>[Fix] Add missing language entries. (Bug #55095)</li>
<li>[Fix] Do not permit unauthorised users to delete private messages from folder listing. (Bug #54355)</li>
<li>[Fix] Correctly check for empty strings in custom profile fields. (Bug #55335)</li>
<li>[Change] Log activation through inactive users ACP. (Bug #30145)</li>
<li>[Change] Send time of last item instead of current time in ATOM Feeds. (Bug #53305)</li>
<li>[Change] Use em dash instead of hyphen/minus as separator in ATOM Feeds item statistics. (Bug #53565)</li>

View file

@ -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';
}