From: skodak Date: Mon, 17 Apr 2006 20:40:33 +0000 (+0000) Subject: fixed double header warning in redirect() X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=960855b9a1e52d537ea623708b5af6fd18251c0d;p=moodle.git fixed double header warning in redirect() --- 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') .' )

';