$this->newSessionId = null;
return $this->
doWrite($sessionId,
$data);
} public function destroy(#[\SensitiveParameter] string $sessionId): bool
{ if (!
headers_sent() &&
filter_var(\
ini_get('session.use_cookies'
), \FILTER_VALIDATE_BOOL
)) { if (!
isset($this->sessionName
)) { throw new \
LogicException(sprintf('Session name cannot be empty, did you forget to call "parent::open()" in "%s"?.',
static::
class));
} $cookie = SessionUtils::
popSessionCookie($this->sessionName,
$sessionId);
/*
* We send an invalidation Set-Cookie header (zero lifetime)
* when either the session was started or a cookie with
* the session name was sent by the client (in which case
* we know it's invalid as a valid session cookie would've
* started the session).
*/
if (null ===
$cookie ||
isset($_COOKIE[$this->sessionName
])) { $params =
session_get_cookie_params();
unset($params['lifetime'
]);