From c7ae61f2f39f47f4ed2f01c2d1f08f93cb08f495 Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Sun, 15 Jun 2014 00:05:58 +0200 Subject: [ticket/12711] Cast values to string such that they are quoted in SQL queries. The value is stored in a text column and the key is stored in a varchar. Some DBMSes do not like it when we insert integers into text columns. Cast both to string to be on the safe side. PHPBB3-12711 --- phpBB/phpbb/config/db_text.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'phpBB') diff --git a/phpBB/phpbb/config/db_text.php b/phpBB/phpbb/config/db_text.php index fb8588334e..b1e3ef5da4 100644 --- a/phpBB/phpbb/config/db_text.php +++ b/phpBB/phpbb/config/db_text.php @@ -105,8 +105,8 @@ class db_text if (!$this->db->sql_affectedrows($result)) { $sql = 'INSERT INTO ' . $this->table . ' ' . $this->db->sql_build_array('INSERT', array( - 'config_name' => $key, - 'config_value' => $value, + 'config_name' => (string) $key, + 'config_value' => (string) $value, )); $this->db->sql_query($sql); } -- cgit v1.2.1