diff --git a/phpBB/phpbb/config/db.php b/phpBB/phpbb/config/db.php index 5c20bb5ec9..a346164db2 100644 --- a/phpBB/phpbb/config/db.php +++ b/phpBB/phpbb/config/db.php @@ -170,9 +170,9 @@ class db extends config if (!isset($this->config[$key])) { $sql = 'INSERT INTO ' . $this->table . ' ' . $this->db->sql_build_array('INSERT', array( - 'config_name' => $this->db->sql_escape($key), - 'config_value' => $this->db->sql_escape($new_value), - 'is_dynamic' => ($use_cache) ? 0 : 1)); + 'config_name' => $key, + 'config_value' => $new_value, + 'is_dynamic' => $use_cache ? 0 : 1)); $this->db->sql_query($sql); } diff --git a/tests/config/db_test.php b/tests/config/db_test.php index c77b3a3f66..11c99435f8 100644 --- a/tests/config/db_test.php +++ b/tests/config/db_test.php @@ -94,7 +94,7 @@ class phpbb_config_db_test extends phpbb_database_test_case // re-read config and populate cache $config2 = new \phpbb\config\db($this->db, $this->cache, 'phpbb_config'); - $this->cache->checkVar($this, 'config', array('foo' => '23', 'foobar' => '5', 'foobar_json' => $json_value)); + $this->cache->checkVar($this, 'config', ['foo' => '23', 'foobar_json' => $json_value]); } public function test_set_new_uncached()