From 78bee95264ee74081a2ef732206281a4daf0ab38 Mon Sep 17 00:00:00 2001 From: David Grudl Date: Sat, 4 Sep 2021 00:01:23 +0200 Subject: [PATCH] Session: cleaning is done in __destruct --- src/Http/Session.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Http/Session.php b/src/Http/Session.php index 6f5b3a89..9dc4e5ec 100644 --- a/src/Http/Session.php +++ b/src/Http/Session.php @@ -148,8 +148,12 @@ private function initialize(): void } } } + } + - register_shutdown_function([$this, 'clean']); + public function __destruct() + { + $this->clean(); }