Skip to content

Commit 073e3f4

Browse files
committed
backtrace
1 parent adad679 commit 073e3f4

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/DB.php

+6-1
Original file line numberDiff line numberDiff line change
@@ -357,11 +357,16 @@ private function debug() {
357357

358358
$backtrace = debug_backtrace();
359359
if (!empty($backtrace)) {
360+
$backtraces = [];
360361
foreach ($backtrace as $info) {
361362
if (isset($info['file']) && $info['file'] != __FILE__) {
362-
$error['Backtrace'] = $info['file'] . ' at line ' . $info['line'];
363+
$backtraces[] = $info['file'] . ' at line ' . $info['line'];
363364
}
364365
}
366+
367+
if ($backtraces) {
368+
$error['Backtrace'] = implode(PHP_EOL, $backtraces);
369+
}
365370
}
366371

367372
$msg = 'SQL Error' . PHP_EOL . str_repeat('-', 50);

0 commit comments

Comments
 (0)