Merge pull request #8987 from MrPetovan/bug/8984-session-destroy

Add support for empty session write
This commit is contained in:
Michael Vogel 2020-08-08 05:39:57 +02:00 committed by GitHub
commit e733055485
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 2 additions and 7 deletions

View File

@ -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);

View File

@ -94,7 +94,7 @@ class Database implements SessionHandlerInterface
}
if (!$session_data) {
return true;
return $this->destroy($session_id);
}
$expire = time() + Session::$expire;

View File

@ -53,9 +53,4 @@ class Native extends AbstractSession implements ISession
session_start();
return $this;
}
public function clear()
{
session_destroy();
}
}