mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
fix for checking required field on booleans
git-svn-id: file:///svn/phpbb/trunk@6069 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
832faaa6c8
commit
a161503f2a
1 changed files with 8 additions and 1 deletions
|
@ -115,6 +115,13 @@ class custom_profile
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case FIELD_BOOL:
|
||||||
|
if (!$field_value && $field_data['field_required'])
|
||||||
|
{
|
||||||
|
return 'FIELD_REQUIRED';
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
case FIELD_INT:
|
case FIELD_INT:
|
||||||
if (empty($field_value) && !$field_data['field_required'])
|
if (empty($field_value) && !$field_data['field_required'])
|
||||||
{
|
{
|
||||||
|
@ -537,7 +544,7 @@ class custom_profile
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (!$preview && is_null($user->profile_fields[$user_ident]))
|
if (!$preview && isset($user->profile_fields[$user_ident]) && is_null($user->profile_fields[$user_ident]))
|
||||||
{
|
{
|
||||||
$value = NULL;
|
$value = NULL;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue