summaryrefslogtreecommitdiff
path: root/inc/display.php
diff options
context:
space:
mode:
Diffstat (limited to 'inc/display.php')
-rw-r--r--inc/display.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/inc/display.php b/inc/display.php
index 4972d563..dddb6559 100644
--- a/inc/display.php
+++ b/inc/display.php
@@ -58,7 +58,7 @@ function createBoardlist($mod=false) {
}
function error($message, $priority = true, $debug_stuff = false) {
- global $board, $mod, $config;
+ global $board, $mod, $config, $db_error;
if ($config['syslog'] && $priority !== false) {
// Use LOG_NOTICE instead of LOG_ERR or LOG_WARNING because most error message are not significant.
@@ -70,6 +70,10 @@ function error($message, $priority = true, $debug_stuff = false) {
die('Error: ' . $message . "\n");
}
+ if ($config['debug'] && isset($db_error)) {
+ $debug_stuff = array_combine(array('SQLSTATE', 'Error code', 'Error message'), $db_error);
+ }
+
die(Element('page.html', array(
'config' => $config,
'title' => _('Error'),