aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/profilefields/manager.php
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2014-03-30 15:44:58 +0200
committerJoas Schilling <nickvergessen@gmx.de>2014-03-30 15:59:51 +0200
commit86c4d24a8ac14c4339806871ab326aedec4965e9 (patch)
treea4a751939c6d75d1d7085138dedb5ed5f9eea741 /phpBB/phpbb/profilefields/manager.php
parent3e909711d2b8115f6a53a46be1e702a7fdc8a0c0 (diff)
downloadforums-86c4d24a8ac14c4339806871ab326aedec4965e9.tar
forums-86c4d24a8ac14c4339806871ab326aedec4965e9.tar.gz
forums-86c4d24a8ac14c4339806871ab326aedec4965e9.tar.bz2
forums-86c4d24a8ac14c4339806871ab326aedec4965e9.tar.xz
forums-86c4d24a8ac14c4339806871ab326aedec4965e9.zip
[ticket/12331] Fix SQL error when inserting a new entry to profile field data
There was a "Field 'pf_phpbb_interests' doesn't have a default value" error, because we didn't specify values for the disabled fields. We can not disable the sql_return_on_error() thou, because it otherwise we run into "Duplicate entry '2' for key 'PRIMARY'" errors when the user submits the form again but didn't change any values. PHPBB3-12331
Diffstat (limited to 'phpBB/phpbb/profilefields/manager.php')
-rw-r--r--phpBB/phpbb/profilefields/manager.php1
1 files changed, 1 insertions, 0 deletions
diff --git a/phpBB/phpbb/profilefields/manager.php b/phpBB/phpbb/profilefields/manager.php
index a4626bc5de..f4baec7a6c 100644
--- a/phpBB/phpbb/profilefields/manager.php
+++ b/phpBB/phpbb/profilefields/manager.php
@@ -231,6 +231,7 @@ class manager
if (!$this->db->sql_affectedrows())
{
+ $cp_data = $this->build_insert_sql_array($cp_data);
$cp_data['user_id'] = (int) $user_id;
$this->db->sql_return_on_error(true);