From 6d706916bd78e3206bebc5e057b0b6c686004f42 Mon Sep 17 00:00:00 2001 From: skodak Date: Mon, 1 May 2006 21:31:12 +0000 Subject: [PATCH] double header in error() workaround --- lib/weblib.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/weblib.php b/lib/weblib.php index a86b59902d..7bd5d8adda 100644 --- a/lib/weblib.php +++ b/lib/weblib.php @@ -4029,9 +4029,12 @@ function print_scale_menu_helpbutton($courseid, $scale) { function error ($message, $link='') { global $CFG, $SESSION; - @header('HTTP/1.0 404 Not Found'); + if (!headers_sent()) { + //header not yet printed + @header('HTTP/1.0 404 Not Found'); + print_header(get_string('error')); + } - print_header(get_string('error')); echo '
'; $message = clean_text($message); // In case nasties are in here -- 2.39.5