|
From: Chris S. <too...@ph...> - 2009-10-07 14:54:57
|
Author: toonarmy
Date: Wed Oct 7 15:54:10 2009
New Revision: 10216
Log:
Properly fix #40925
Modified:
branches/phpBB-3_0_0/phpBB/includes/acp/acp_profile.php
branches/phpBB-3_0_0/phpBB/includes/functions_profile_fields.php
Modified: branches/phpBB-3_0_0/phpBB/includes/acp/acp_profile.php
==============================================================================
*** branches/phpBB-3_0_0/phpBB/includes/acp/acp_profile.php (original)
--- branches/phpBB-3_0_0/phpBB/includes/acp/acp_profile.php Wed Oct 7 15:54:10 2009
***************
*** 509,514 ****
--- 509,522 ----
// 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;
}
Modified: branches/phpBB-3_0_0/phpBB/includes/functions_profile_fields.php
==============================================================================
*** branches/phpBB-3_0_0/phpBB/includes/functions_profile_fields.php (original)
--- branches/phpBB-3_0_0/phpBB/includes/functions_profile_fields.php Wed Oct 7 15:54:10 2009
***************
*** 624,630 ****
}
else
{
! if (!$preview && isset($user->profile_fields[$user_ident]) && is_null($user->profile_fields[$user_ident]))
{
$value = NULL;
}
--- 624,630 ----
}
else
{
! if (!$preview && array_key_exists($user_ident, $user->profile_fields) && is_null($user->profile_fields[$user_ident]))
{
$value = NULL;
}
|