diff --git a/src/Http/Session.php b/src/Http/Session.php index cf3d1a4b3e1..4216de36f52 100644 --- a/src/Http/Session.php +++ b/src/Http/Session.php @@ -379,7 +379,13 @@ public function close() return true; } - return session_write_close(); + if (!session_write_close()) { + throw new RuntimeException('Could not close the session'); + } + + $this->_started = false; + + return true; } /**