diff options
author | Robin Appelman <icewind@owncloud.com> | 2013-12-09 15:38:27 +0400 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2013-12-09 15:38:27 +0400 |
commit | a36bf5c2b5430eb4bcbabead92c9d2c1a669b035 (patch) | |
tree | 14e059a657af72c836d65121a5c9998602da2ed7 /lib/private/session/internal.php | |
parent | bc3650e48c7ec4f05794c2bd98a90cca3090f1e3 (diff) |
preserve 3rd party values in in the Session destructor
Diffstat (limited to 'lib/private/session/internal.php')
-rw-r--r-- | lib/private/session/internal.php | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/private/session/internal.php b/lib/private/session/internal.php index 60aecccc8aa..49b52b5c796 100644 --- a/lib/private/session/internal.php +++ b/lib/private/session/internal.php @@ -26,10 +26,19 @@ class Internal extends Memory { } public function __destruct() { - $_SESSION = $this->data; + $_SESSION = array_merge($_SESSION, $this->data); session_write_close(); } + /** + * @param string $key + */ + public function remove($key) { + // also remove it from $_SESSION to prevent re-setting the old value during the merge + unset($_SESSION[$key]); + parent::remove($key); + } + public function clear() { session_unset(); @session_regenerate_id(true); |