From 63d5691fb253407438c716c0818e44c508a4054a Mon Sep 17 00:00:00 2001 From: Sam Minnee Date: Sat, 8 Aug 2009 03:10:20 +0000 Subject: [PATCH] BUGFIX: Don't make the Director completely fail if there was output prior to session_start() being called. git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@84063 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- core/control/Director.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/control/Director.php b/core/control/Director.php index 3d3979e8a..16087abba 100644 --- a/core/control/Director.php +++ b/core/control/Director.php @@ -119,7 +119,8 @@ class Director { if(isset($_SERVER['HTTP_REFERER'])) $req->addHeader("Referer", $_SERVER['HTTP_REFERER']); // Load the session into the controller - $session = new Session($_SESSION); + $session = new Session(isset($_SESSION) ? $_SESSION : null); + $result = Director::handleRequest($req, $session); $session->inst_save();