From 453945da14c6c7354535189d251c5eda193253ca Mon Sep 17 00:00:00 2001 From: Loz Calver Date: Wed, 20 Nov 2019 14:21:30 +0000 Subject: [PATCH] FIX: Session::restart() didn't correctly restart session (fixes #9259) --- src/Control/Session.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/Control/Session.php b/src/Control/Session.php index 638cd7fe7..b7a4e1ade 100644 --- a/src/Control/Session.php +++ b/src/Control/Session.php @@ -226,9 +226,7 @@ class Session if (isset($this->data['HTTP_USER_AGENT'])) { if ($this->data['HTTP_USER_AGENT'] !== $this->userAgent($request)) { $this->clearAll(); - $this->destroy(); - $this->started = false; - $this->start($request); + $this->restart($request); } } } @@ -241,7 +239,7 @@ class Session public function restart(HTTPRequest $request) { $this->destroy(); - $this->init($request); + $this->start($request); } /** @@ -369,6 +367,7 @@ class Session // http://nz1.php.net/manual/en/function.session-destroy.php unset($_SESSION); $this->data = null; + $this->started = false; } /**