diff options
Diffstat (limited to 'lib/private/session')
-rw-r--r-- | lib/private/session/internal.php | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/private/session/internal.php b/lib/private/session/internal.php index d589932d425..9d3b9cb81ba 100644 --- a/lib/private/session/internal.php +++ b/lib/private/session/internal.php @@ -26,8 +26,7 @@ class Internal extends Memory { } public function __destruct() { - $_SESSION = array_merge($_SESSION, $this->data); - \OC::$session->close(); + $this->close(); } /** @@ -47,4 +46,12 @@ class Internal extends Memory { @session_start(); $this->data = $_SESSION = array(); } + + public function close() { + $_SESSION = array_merge($_SESSION, $this->data); + session_write_close(); + + parent::close(); + } + } |