From 70e0d60f9310eb05006f5ccef0159b8a5bc979bd Mon Sep 17 00:00:00 2001 From: Damian Mooyman Date: Thu, 5 Feb 2015 11:23:26 +1300 Subject: [PATCH] BUG Fix developer output in redirection script --- control/HTTPResponse.php | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/control/HTTPResponse.php b/control/HTTPResponse.php index 8b4cd9412..dbcfec613 100644 --- a/control/HTTPResponse.php +++ b/control/HTTPResponse.php @@ -238,13 +238,17 @@ class SS_HTTPResponse { $url = Director::absoluteURL($this->headers['Location'], true); $urlATT = Convert::raw2htmlatt($url); $urlJS = Convert::raw2js($url); - echo - "

Redirecting to " - . "$urlATT... (output started on $file, line $line)

- - "; + $title = Director::isDev() + ? "{$urlATT}... (output started on {$file}, line {$line})" + : "{$urlATT}..."; + echo <<Redirecting to {$title}

+ +"; +EOT + ; } else { $line = $file = null; if(!headers_sent($file, $line)) {