Fixed fatal error if calling $session->invalidate() when there's no active session

This commit is contained in:
Matias Griese
2018-10-25 16:29:53 +03:00
parent a3caa13c23
commit d8a627898e
2 changed files with 10 additions and 2 deletions

View File

@@ -1,3 +1,9 @@
# v1.5.4
## mm/dd/2018
1. [](#bugfix)
* Fixed fatal error if calling `$session->invalidate()` when there's no active session
# v1.5.3
## 10/08/2018

View File

@@ -229,8 +229,10 @@ class Session implements SessionInterface
$params['httponly']
);
session_unset();
session_destroy();
if ($this->isSessionStarted()) {
session_unset();
session_destroy();
}
$this->started = false;