quote sql query parameters when writing to the debug log

This commit is contained in:
Joe Nahmias 2023-02-19 20:09:44 -05:00 committed by Frédéric Guillot
parent 87432a4f34
commit a69709b305
1 changed files with 2 additions and 2 deletions

View File

@ -269,13 +269,13 @@ class StatementHandler
foreach ($this->positionalParams as $value) {
$pdoStatement->bindValue($i, $value, PDO::PARAM_STR);
$this->db->setLogMessage("param[$i]: $value");
$this->db->setLogMessage("param[$i]: '$value'");
$i++;
}
foreach ($this->namedParams as $name => $value) {
$pdoStatement->bindValue($name, $value, PDO::PARAM_STR);
$this->db->setLogMessage("param[$name]: $value");
$this->db->setLogMessage("param[$name]: '$value'");
}
}