From 960855b9a1e52d537ea623708b5af6fd18251c0d Mon Sep 17 00:00:00 2001 From: skodak Date: Mon, 17 Apr 2006 20:40:33 +0000 Subject: [PATCH] fixed double header warning in redirect() --- lib/weblib.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/weblib.php b/lib/weblib.php index 0c4799a338..4cc79f1e01 100644 --- a/lib/weblib.php +++ b/lib/weblib.php @@ -4264,7 +4264,9 @@ function redirect($url, $message='', $delay='0') { if (empty($delay)) { $delay = 3; // There's no point having a message with no delay } - print_header('', '', '', '', ''); + if (!headers_sent()) { + print_header('', '', '', '', ''); + } echo '
'; echo '

'. $message .'

'; echo '

( '. get_string('continue') .' )

'; -- 2.39.5