1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-01 22:40:39 +02:00

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

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