diff --git a/CHANGELOG.md b/CHANGELOG.md index 355c06136..571709661 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/system/src/Grav/Framework/Session/Session.php b/system/src/Grav/Framework/Session/Session.php index c060345a5..f6133d336 100644 --- a/system/src/Grav/Framework/Session/Session.php +++ b/system/src/Grav/Framework/Session/Session.php @@ -229,8 +229,10 @@ class Session implements SessionInterface $params['httponly'] ); - session_unset(); - session_destroy(); + if ($this->isSessionStarted()) { + session_unset(); + session_destroy(); + } $this->started = false;