diff --git a/phpBB/phpbb/profilefields/manager.php b/phpBB/phpbb/profilefields/manager.php index eebdbd07ae..37449c67c4 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); diff --git a/tests/functional/ucp_profile_test.php b/tests/functional/ucp_profile_test.php new file mode 100644 index 0000000000..e0e6255f79 --- /dev/null +++ b/tests/functional/ucp_profile_test.php @@ -0,0 +1,33 @@ +add_lang('ucp'); + $this->login(); + + $crawler = self::request('GET', 'ucp.php?i=ucp_profile&mode=profile_info'); + $this->assertContainsLang('UCP_PROFILE_PROFILE_INFO', $crawler->filter('#cp-main h2')->text()); + + $form = $crawler->selectButton('Submit')->form(array( + 'pf_phpbb_location' => 'Bertie“s Empire', + )); + $crawler = self::submit($form); + $this->assertContainsLang('PROFILE_UPDATED', $crawler->filter('#message')->text()); + + $crawler = self::request('GET', 'ucp.php?i=ucp_profile&mode=profile_info'); + $form = $crawler->selectButton('Submit')->form(); + $this->assertEquals('Bertie“s Empire', $form->get('pf_phpbb_location')->getValue()); + } +}