Merge pull request #9327 from kinglozzer/9259-session-restart

FIX: Session::restart() didn't correctly restart session (fixes #9259)
This commit is contained in:
Stevie Mayhew 2019-11-21 11:52:36 +13:00 committed by GitHub
commit 92acc764f7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;
}
/**