From 54a578bb83a43840c7b0b8b50a3cf10b6dfe51e1 Mon Sep 17 00:00:00 2001 From: Tobias Schultze Date: Mon, 11 Oct 2021 17:01:43 +0200 Subject: [PATCH] [HttpFoundation] remove legacy session lifetime logic --- .../Session/Storage/Handler/PdoSessionHandler.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/PdoSessionHandler.php b/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/PdoSessionHandler.php index 482d495b9bbf4..843fedf0e493b 100644 --- a/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/PdoSessionHandler.php +++ b/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/PdoSessionHandler.php @@ -65,8 +65,6 @@ class PdoSessionHandler extends AbstractSessionHandler */ public const LOCK_TRANSACTIONAL = 2; - private const MAX_LIFETIME = 315576000; - private \PDO $pdo; /** @@ -362,10 +360,9 @@ public function close(): bool $this->gcCalled = false; // delete the session records that have expired - $sql = "DELETE FROM $this->table WHERE $this->lifetimeCol < :time AND $this->lifetimeCol > :min"; + $sql = "DELETE FROM $this->table WHERE $this->lifetimeCol < :time"; $stmt = $this->pdo->prepare($sql); $stmt->bindValue(':time', time(), \PDO::PARAM_INT); - $stmt->bindValue(':min', self::MAX_LIFETIME, \PDO::PARAM_INT); $stmt->execute(); }