Regenerate a session ID only if the session exists

refs #11151
This commit is contained in:
Alexander A. Klimov 2016-02-15 11:14:37 +01:00
parent a464e74aa4
commit c5281935c6
1 changed files with 3 additions and 1 deletions

View File

@ -213,7 +213,9 @@ class PhpSession extends Session
public function refreshId()
{
$this->open();
session_regenerate_id();
if ($this->exists()) {
session_regenerate_id();
}
session_write_close();
$this->hasBeenTouched = true;
}