diff --git a/src/Core/Session/Handler/Cache.php b/src/Core/Session/Handler/Cache.php index 5aec68e63..af82deb58 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 3c2f9027a..c61402954 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 83ed0f6e6..49550a27c 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(); - } }