mirror of
https://github.com/postfixadmin/postfixadmin.git
synced 2024-09-20 03:36:20 +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 = $link->prepare($sql);
|
||||||
$stmt->execute($values);
|
$stmt->execute($values);
|
||||||
} catch (PDOException $e) {
|
} 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);
|
error_log($error_text);
|
||||||
if ($throw_exceptions) {
|
if ($throw_exceptions) {
|
||||||
throw $e;
|
throw $e;
|
||||||
|
Loading…
Reference in New Issue
Block a user