summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2003-06-02 20:04:40 +0000
committerDries Buytaert <dries@buytaert.net>2003-06-02 20:04:40 +0000
commit1839f42c59c88003ac8877c1863d4d0c41808fa7 (patch)
tree267d8ae283bf548c2933bed5768984f61c8f7c0a
parent85d22f3e822ed9f9d3d68222aa44dc533a9a6e18 (diff)
downloadbrdo-1839f42c59c88003ac8877c1863d4d0c41808fa7.tar.gz
brdo-1839f42c59c88003ac8877c1863d4d0c41808fa7.tar.bz2
Patch by Kjartan:
- Fixed the parse errors - Send the proper response code to the user
-rw-r--r--error.php16
1 files changed, 12 insertions, 4 deletions
diff --git a/error.php b/error.php
index 0a939ea6a..0433593d5 100644
--- a/error.php
+++ b/error.php
@@ -3,10 +3,18 @@
include_once "includes/common.inc";
-$errors = array(500 => "500 error: internal server error", 404 => "404 error: '".`$_SERVER["REDIRECT_URL"] ."' not found", 403 => "403 error: access denied - forbidden", 401 => "401 error: authorization required", 400 => "400 error: bad request");
+$errors = array(
+ 500 => "500 error: internal server error",
+ 404 => "404 error: '". $_SERVER["REDIRECT_URL"] ."' not found",
+ 403 => "403 error: access denied - forbidden",
+ 401 => "401 error: authorization required",
+ 400 => "400 error: bad request"
+);
-watchdog("httpd", $errors[$_SERVER["REDIRECT_STATUS"]);
-
-drupal_goto($base_url);
+if ($errors[$_SERVER["REDIRECT_STATUS"]]) {
+ watchdog("httpd", $errors[$_SERVER["REDIRECT_STATUS"]]);
+ header("HTTP/1.0 ". $errors[$_SERVER["REDIRECT_STATUS"]]);
+}
+include_once("$base_url/index.php");
?>