diff options
| author | ctrlcctrlv <wizardchan@hush.com> | 2013-08-17 19:08:54 +0000 |
|---|---|---|
| committer | ctrlcctrlv <wizardchan@hush.com> | 2013-08-17 19:08:54 +0000 |
| commit | 979e5754a5ca7601f573957a69971b4e37bf869a (patch) | |
| tree | 9bf60003c34bcb6d903fa5bae676140ade9947db /inc | |
| parent | 6cb863005dff0075b67d3f00fe950640fc153b78 (diff) | |
Better error handling
Diffstat (limited to 'inc')
| -rw-r--r-- | inc/display.php | 3 |
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, |
