fix undefined debug-flag if not present

Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann
2018-09-30 10:18:19 +02:00
parent 5752f7b64e
commit c35407bc94

View File

@@ -379,7 +379,11 @@ class Database {
}
if ($showerror && $json_response) {
throw new Exception($error_message.($sql['debug'] ? "\n\n".$error_trace : ''), 500);
$exception_message = $error_message;
if (isset($sql['debug']) && $sql['debug'] == true) {
$exception_message .= "\n\n".$error_trace;
}
throw new Exception($exception_message, 500);
}
if ($showerror) {