Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 54a578b

Browse filesBrowse files
committed
[HttpFoundation] remove legacy session lifetime logic
1 parent 143ecb3 commit 54a578b
Copy full SHA for 54a578b

File tree

Expand file treeCollapse file tree

1 file changed

+1
-4
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+1
-4
lines changed

‎src/Symfony/Component/HttpFoundation/Session/Storage/Handler/PdoSessionHandler.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/HttpFoundation/Session/Storage/Handler/PdoSessionHandler.php
+1-4Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,6 @@ class PdoSessionHandler extends AbstractSessionHandler
6565
*/
6666
public const LOCK_TRANSACTIONAL = 2;
6767

68-
private const MAX_LIFETIME = 315576000;
69-
7068
private \PDO $pdo;
7169

7270
/**
@@ -362,10 +360,9 @@ public function close(): bool
362360
$this->gcCalled = false;
363361

364362
// delete the session records that have expired
365-
$sql = "DELETE FROM $this->table WHERE $this->lifetimeCol < :time AND $this->lifetimeCol > :min";
363+
$sql = "DELETE FROM $this->table WHERE $this->lifetimeCol < :time";
366364
$stmt = $this->pdo->prepare($sql);
367365
$stmt->bindValue(':time', time(), \PDO::PARAM_INT);
368-
$stmt->bindValue(':min', self::MAX_LIFETIME, \PDO::PARAM_INT);
369366
$stmt->execute();
370367
}
371368

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.