diff --git a/src/Core/Session/Handler/Cache.php b/src/Core/Session/Handler/Cache.php index 5aec68e634..af82deb586 100644 --- a/src/Core/Session/Handler/Cache.php +++ b/src/Core/Session/Handler/Cache.php @@ -87,7 +87,7 @@ class Cache implements SessionHandlerInterface } if (!$session_data) { - return true; + return $this->destroy($session_id); } return $this->cache->set('session:' . $session_id, $session_data, Session::$expire); diff --git a/src/Core/Session/Handler/Database.php b/src/Core/Session/Handler/Database.php index 3c2f9027a5..c61402954d 100644 --- a/src/Core/Session/Handler/Database.php +++ b/src/Core/Session/Handler/Database.php @@ -94,7 +94,7 @@ class Database implements SessionHandlerInterface } if (!$session_data) { - return true; + return $this->destroy($session_id); } $expire = time() + Session::$expire;