From 2f4c32e682ba6eca7f330ed27b192b4049cd9303 Mon Sep 17 00:00:00 2001 From: Matias Griese Date: Wed, 8 Oct 2014 18:59:32 +0300 Subject: [PATCH] Add session close before redirect --- system/src/Grav/Common/Grav.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/system/src/Grav/Common/Grav.php b/system/src/Grav/Common/Grav.php index 341a54fda..c04d4f784 100644 --- a/system/src/Grav/Common/Grav.php +++ b/system/src/Grav/Common/Grav.php @@ -198,6 +198,11 @@ class Grav extends Container { /** @var Uri $uri */ $uri = $this['uri']; + + if (isset($this['session'])) { + $this['session']->close(); + } + header("Location: " . rtrim($uri->rootUrl(), '/') .'/'. trim($route, '/'), true, $code); exit(); }