summaryrefslogtreecommitdiff
path: root/inc
diff options
context:
space:
mode:
authorctrlcctrlv <wizardchan@hush.com>2013-08-17 19:08:54 +0000
committerctrlcctrlv <wizardchan@hush.com>2013-08-17 19:08:54 +0000
commit979e5754a5ca7601f573957a69971b4e37bf869a (patch)
tree9bf60003c34bcb6d903fa5bae676140ade9947db /inc
parent6cb863005dff0075b67d3f00fe950640fc153b78 (diff)
Better error handling
Diffstat (limited to 'inc')
-rw-r--r--inc/display.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/inc/display.php b/inc/display.php
index 0f1bc195..9009be9a 100644
--- a/inc/display.php
+++ b/inc/display.php
@@ -74,6 +74,9 @@ function error($message, $priority = true, $debug_stuff = false) {
if ($config['debug'] && isset($db_error)) {
$debug_stuff = array_combine(array('SQLSTATE', 'Error code', 'Error message'), $db_error);
}
+
+ // Return the bad request header, necessary for AJAX posts
+ http_response_code(400);
die(Element('page.html', array(
'config' => $config,