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; diff --git a/src/Core/Session/Native.php b/src/Core/Session/Native.php index 83ed0f6e6e..49550a27c0 100644 --- a/src/Core/Session/Native.php +++ b/src/Core/Session/Native.php @@ -53,9 +53,4 @@ class Native extends AbstractSession implements ISession session_start(); return $this; } - - public function clear() - { - session_destroy(); - } }