From c717e44094ce6d3b3ad4f56519b8f421ec06146e Mon Sep 17 00:00:00 2001 From: Niklas Schmidtmer Date: Sun, 13 Feb 2011 18:29:30 +0100 Subject: [PATCH] [ticket/8904] Show default value for numeric custom profile fields when editing When displaying the default value for a numeric custom profile field, only use request_var to obtain the value on creation. When editing, it will always override the actual value with an empty string, as this is request_var's default return value. PHPBB3-8904 --- phpBB/includes/acp/acp_profile.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/includes/acp/acp_profile.php b/phpBB/includes/acp/acp_profile.php index 2288a0728b..2e43b0545a 100644 --- a/phpBB/includes/acp/acp_profile.php +++ b/phpBB/includes/acp/acp_profile.php @@ -512,7 +512,7 @@ class acp_profile else if ($field_type == FIELD_INT && $key == 'field_default_value') { // Permit an empty string - if (request_var('field_default_value', '') === '') + if ($action == 'create' && request_var('field_default_value', '') === '') { $var = ''; }