-
Bug
-
Resolution: Duplicate
-
Minor
-
None
-
None
-
None
-
Linux, MySQL5
Bug has place if you have disabled integer custom profile field with empty default value.
Error example:
Incorrect integer value: '' for column 'pf_testnew' at row 1 [1366]
Possible ways to fix it:
1) Don't let user create such field
2) in functions_profile_fields.php after (around line 880)
|
$cp_data['pf_' . $row['field_ident']] = (in_array($row['field_type'], array(FIELD_TEXT, FIELD_STRING))) ? $row['lang_default_value'] : $row['field_default_value'];
|
add
|
// Small fix for int fields with empty default value
|
if($row['field_type'] == FIELD_INT && empty($cp_data['pf_' . $row['field_ident']]))
|
$cp_data['pf_' . $row['field_ident']] = 0;
|
|
- duplicates
-
PHPBB-9075 Missing / bad default values of CPFs result in SQL errors on registration of new users
- Closed