aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes
diff options
context:
space:
mode:
authorNils Adermann <naderman@naderman.de>2010-11-07 00:04:14 +0100
committerNils Adermann <naderman@naderman.de>2010-11-07 00:04:14 +0100
commit7ca63778929d4ba494235533af94b757e00c1369 (patch)
tree2d1bed8bf8f23d1a3fd92d3fad611006a221bdae /phpBB/includes
parentb60892d200247b4d608806f2172f681001cfa64b (diff)
parentf7180f44303e441005f0b1f4d652657b9f406642 (diff)
downloadforums-7ca63778929d4ba494235533af94b757e00c1369.tar
forums-7ca63778929d4ba494235533af94b757e00c1369.tar.gz
forums-7ca63778929d4ba494235533af94b757e00c1369.tar.bz2
forums-7ca63778929d4ba494235533af94b757e00c1369.tar.xz
forums-7ca63778929d4ba494235533af94b757e00c1369.zip
Merge branch 'develop-olympus' into develop
* develop-olympus: [ticket/9075] CPF Numbers fields: Prevent SQL error on registration page.
Diffstat (limited to 'phpBB/includes')
-rw-r--r--phpBB/includes/functions_profile_fields.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/phpBB/includes/functions_profile_fields.php b/phpBB/includes/functions_profile_fields.php
index 3ad06a3383..2bc16cead5 100644
--- a/phpBB/includes/functions_profile_fields.php
+++ b/phpBB/includes/functions_profile_fields.php
@@ -879,6 +879,11 @@ class custom_profile
$now = getdate();
$row['field_default_value'] = sprintf('%2d-%2d-%4d', $now['mday'], $now['mon'], $now['year']);
}
+ else if ($row['field_default_value'] === '' && $row['field_type'] == FIELD_INT)
+ {
+ // We cannot insert an empty string into an integer column.
+ $row['field_default_value'] = NULL;
+ }
$cp_data['pf_' . $row['field_ident']] = (in_array($row['field_type'], array(FIELD_TEXT, FIELD_STRING))) ? $row['lang_default_value'] : $row['field_default_value'];
}