mirror of
https://github.com/phpbb/phpbb.git
synced 2025-02-23 03:19:01 +01:00
[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
This commit is contained in:
parent
d310ffc26c
commit
c7ae61f2f3
@ -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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user