diff --git a/CHANGELOG.md b/CHANGELOG.md index 50cbc1f8f..d12c70d83 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -58,6 +58,12 @@ * Doctrine filecache is now namespaced with prefix to support purging * Register all page types into `blueprint://pages` stream +# 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 diff --git a/system/src/Grav/Framework/Session/Session.php b/system/src/Grav/Framework/Session/Session.php index e66c211a9..077adb15a 100644 --- a/system/src/Grav/Framework/Session/Session.php +++ b/system/src/Grav/Framework/Session/Session.php @@ -225,8 +225,10 @@ class Session implements SessionInterface $params['httponly'] ); - session_unset(); - session_destroy(); + if ($this->isSessionStarted()) { + session_unset(); + session_destroy(); + } $this->started = false;