From a161503f2a3b62cebc719b9eaa7bb07b925aef66 Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Thu, 15 Jun 2006 15:12:55 +0000 Subject: [PATCH] fix for checking required field on booleans git-svn-id: file:///svn/phpbb/trunk@6069 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/functions_profile_fields.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/phpBB/includes/functions_profile_fields.php b/phpBB/includes/functions_profile_fields.php index 10a1b899c7..4938f9cc33 100644 --- a/phpBB/includes/functions_profile_fields.php +++ b/phpBB/includes/functions_profile_fields.php @@ -115,6 +115,13 @@ class custom_profile } break; + case FIELD_BOOL: + if (!$field_value && $field_data['field_required']) + { + return 'FIELD_REQUIRED'; + } + break; + case FIELD_INT: if (empty($field_value) && !$field_data['field_required']) { @@ -537,7 +544,7 @@ class custom_profile } 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; }