Skip to content

Commit

Permalink
bugfixes
Browse files Browse the repository at this point in the history
  • Loading branch information
verfriemelt-dot-org committed Mar 28, 2024
1 parent 257eb83 commit 7802cbc
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions _/Session/Session.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@ public function shutdown(): void
public function delete(string $name): static
{
$this->inUse = true;

if ($this->sessionId === null) {
$this->start();
}

$this->data->delete($name);
return $this;
}
Expand All @@ -63,6 +68,8 @@ public function destroy(): void
{
$this->storage->delete();
$this->data = new ParameterBag();
$this->sessionId = null;
unset($this->storage);

setcookie(
self::SESSION_COOKIE_NAME,
Expand Down

0 comments on commit 7802cbc

Please sign in to comment.