8000 bug #24579 pdo session fix (mxp100) · symfony/symfony@60adbdd · GitHub
[go: up one dir, main page]

Skip to content
10000

Commit 60adbdd

Browse files
committed
bug #24579 pdo session fix (mxp100)
This PR was merged into the 2.7 branch. Discussion ---------- pdo session fix | Q | A | ------------- | --- | Branch? | 2.7 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #24456 | License | MIT | Doc PR | Fix PDO session timestamp out of range for postgres. (branch from 2.7) P.S. please delete this pull #24457 Commits ------- 56b29a7 pdo session fix
2 parents e980335 + 56b29a7 commit 60adbdd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ public function close()
387387
$this->gcCalled = false;
388388

389389
// delete the session records that have expired
390-
$sql = "DELETE FROM $this->table WHERE $this->lifetimeCol + $this->timeCol < :time";
390+
$sql = "DELETE FROM $this->table WHERE $this->lifetimeCol < :time - $this->timeCol";
391391

392392
$stmt = $this->pdo->prepare($sql);
393393
$stmt->bindValue(':time', time(), \PDO::PARAM_INT);

0 commit comments

Comments
 (0)
0