Only destroy active sessions.
@@ -509,7 +509,7 @@ class Session
$this->start();
}
- if (!$this->_isCli) {
+ if (!$this->_isCli && session_status() === PHP_SESSION_ACTIVE) {
session_destroy();