0
0
mirror of https://github.com/postfixadmin/postfixadmin.git synced 2024-09-19 19:22:14 +02:00

log parameters when it fails

This commit is contained in:
David Goodwin 2021-02-07 19:40:45 +00:00
parent 5bcafb9c91
commit aef69b53a9

View File

@ -1821,7 +1821,7 @@ function db_execute($sql, array $values = [], $throw_exceptions = false) {
$stmt = $link->prepare($sql);
$stmt->execute($values);
} catch (PDOException $e) {
$error_text = "Invalid query: " . $e->getMessage() . " caused by " . $sql ;
$error_text = "Invalid query: " . $e->getMessage() . " caused by " . $sql . ' ' . json_encode($values);
error_log($error_text);
if ($throw_exceptions) {
throw $e;