diff --git a/_/Session/Session.php b/_/Session/Session.php index 7011a2d..f1be430 100644 --- a/_/Session/Session.php +++ b/_/Session/Session.php @@ -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; } @@ -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,