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:
parent
5bcafb9c91
commit
aef69b53a9
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user