MINOR Fixed Director::forceSSL() breaking unit tests because headers were already sent

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@108435 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sean Harvey 2010-07-24 00:26:41 +00:00 committed by Sam Minnee
parent c140ce7395
commit 54f6acfc21
2 changed files with 2 additions and 2 deletions

View File

@ -646,7 +646,7 @@ class Director {
if($matched && !isset($_SERVER['HTTPS'])) {
$destURL = str_replace('http:', 'https:', Director::absoluteURL($_SERVER['REQUEST_URI']));
header("Location: $destURL");
if(!headers_sent()) header("Location: $destURL");
if(SapphireTest::is_running_test()) {
return $destURL;
} else {

View File

@ -5,7 +5,7 @@
*
* @todo test Director::alternateBaseFolder()
*/
class DirectorTest extends FunctionalTest {
class DirectorTest extends SapphireTest {
function setUp() {
parent::setUp();