Skip to content

Commit

Permalink
Fix type issue
Browse files Browse the repository at this point in the history
  • Loading branch information
leepeuker committed Feb 27, 2024
1 parent fde8cd6 commit 26baaca
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions src/Util/SessionWrapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,21 @@ public function destroy() : void
$_SESSION = array();

if (ini_get('session.use_cookies')) {
$sessionName = session_name();
if ($sessionName === false) {
throw new \RuntimeException('Could not get session name');
}

$params = session_get_cookie_params();

setcookie(
session_name(), '', time() - 42000,
$params['path'], $params['domain'],
$params['secure'], $params['httponly'],
$sessionName,
'',
time() - 42000,
$params['path'],
$params['domain'],
$params['secure'],
$params['httponly'],
);
}

Expand Down

0 comments on commit 26baaca

Please sign in to comment.