From ba4645f8aaf1781c4b71b9f78771fa61fd4b4304 Mon Sep 17 00:00:00 2001 From: Andrew O'Neil Date: Sun, 4 Nov 2007 21:33:50 +0000 Subject: [PATCH] Fix Session not saving on some servers (merged from 2.1.1 branch, r43627) git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@44200 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- core/control/Director.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/control/Director.php b/core/control/Director.php index cdf89bc1c..538311e61 100644 --- a/core/control/Director.php +++ b/core/control/Director.php @@ -53,7 +53,10 @@ class Director { $response = $controllerObj->run(array_merge((array)$_GET, (array)$_POST, (array)$_FILES)); // Save the updated session back - $_SESSION = $controllerObj->getSession()->inst_getAll(); + foreach($controllerObj->getSession()->inst_getAll() as $k => $v) { + $_SESSION[$k] = $v; + } + if(isset($_GET['debug_profile'])) Profiler::mark("Outputting to browser"); $response->output();