diff options
author | Chris Smith <toonarmy@phpbb.com> | 2009-12-11 22:55:15 +0000 |
---|---|---|
committer | Chris Smith <toonarmy@phpbb.com> | 2009-12-11 22:55:15 +0000 |
commit | d7a6e63a9a21d74dc146cb8ddcdd0daca539559a (patch) | |
tree | 56ecea19aa90824598359dc9d909386689e1f60c | |
parent | 44b9dfaff5e112f3afede2cc1c84416eb072fc06 (diff) | |
download | forums-d7a6e63a9a21d74dc146cb8ddcdd0daca539559a.tar forums-d7a6e63a9a21d74dc146cb8ddcdd0daca539559a.tar.gz forums-d7a6e63a9a21d74dc146cb8ddcdd0daca539559a.tar.bz2 forums-d7a6e63a9a21d74dc146cb8ddcdd0daca539559a.tar.xz forums-d7a6e63a9a21d74dc146cb8ddcdd0daca539559a.zip |
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
-rw-r--r-- | phpBB/docs/CHANGELOG.html | 1 | ||||
-rw-r--r-- | phpBB/includes/functions_profile_fields.php | 4 |
2 files changed, 3 insertions, 2 deletions
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 @@ <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> 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'; } |