From 457a195797d562d93c5eed46f5e0ab34c7efdfde Mon Sep 17 00:00:00 2001 From: Chris Smith Date: Wed, 7 Oct 2009 14:54:10 +0000 Subject: [PATCH] Properly fix #40925 git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10216 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/acp/acp_profile.php | 8 ++++++++ phpBB/includes/functions_profile_fields.php | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/phpBB/includes/acp/acp_profile.php b/phpBB/includes/acp/acp_profile.php index 1b0ec4b5d5..fc08c7e8e8 100644 --- a/phpBB/includes/acp/acp_profile.php +++ b/phpBB/includes/acp/acp_profile.php @@ -509,6 +509,14 @@ class acp_profile // Get the number of options if this key is 'field_maxlen' $var = request_var('field_default_value', 0); }*/ + else if ($field_type == FIELD_INT && $key == 'field_default_value') + { + // Permit an empty string + if (request_var('field_default_value', '') === '') + { + $var = ''; + } + } $cp->vars[$key] = $var; } diff --git a/phpBB/includes/functions_profile_fields.php b/phpBB/includes/functions_profile_fields.php index 9e356414a9..db1925bdcc 100644 --- a/phpBB/includes/functions_profile_fields.php +++ b/phpBB/includes/functions_profile_fields.php @@ -624,7 +624,7 @@ class custom_profile } else { - if (!$preview && isset($user->profile_fields[$user_ident]) && is_null($user->profile_fields[$user_ident])) + if (!$preview && array_key_exists($user_ident, $user->profile_fields) && is_null($user->profile_fields[$user_ident])) { $value = NULL; }