1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-02-24 20:13:22 +01:00

Properly fix #40925

git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10216 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Chris Smith 2009-10-07 14:54:10 +00:00
parent aef6352a35
commit 457a195797
2 changed files with 9 additions and 1 deletions

View File

@ -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;
}

View File

@ -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;
}