aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
authorAndreas Fischer <bantu@phpbb.com>2014-06-15 00:05:58 +0200
committerAndreas Fischer <bantu@phpbb.com>2014-06-15 00:21:11 +0200
commitc7ae61f2f39f47f4ed2f01c2d1f08f93cb08f495 (patch)
treee0886b86fbd8c4b93ef23dcb94b8094b74f2320f /phpBB
parentd310ffc26cd592cb07148daf6e5a36c4b12c6657 (diff)
downloadforums-c7ae61f2f39f47f4ed2f01c2d1f08f93cb08f495.tar
forums-c7ae61f2f39f47f4ed2f01c2d1f08f93cb08f495.tar.gz
forums-c7ae61f2f39f47f4ed2f01c2d1f08f93cb08f495.tar.bz2
forums-c7ae61f2f39f47f4ed2f01c2d1f08f93cb08f495.tar.xz
forums-c7ae61f2f39f47f4ed2f01c2d1f08f93cb08f495.zip
[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
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/phpbb/config/db_text.php4
1 files changed, 2 insertions, 2 deletions
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);
}