mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
[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
This commit is contained in:
parent
3e909711d2
commit
86c4d24a8a
1 changed files with 1 additions and 0 deletions
|
@ -231,6 +231,7 @@ class manager
|
||||||
|
|
||||||
if (!$this->db->sql_affectedrows())
|
if (!$this->db->sql_affectedrows())
|
||||||
{
|
{
|
||||||
|
$cp_data = $this->build_insert_sql_array($cp_data);
|
||||||
$cp_data['user_id'] = (int) $user_id;
|
$cp_data['user_id'] = (int) $user_id;
|
||||||
|
|
||||||
$this->db->sql_return_on_error(true);
|
$this->db->sql_return_on_error(true);
|
||||||
|
|
Loading…
Add table
Reference in a new issue