We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4f47bb7 commit 826dfbdCopy full SHA for 826dfbd
src/Symfony/Component/HttpFoundation/Session/Storage/Handler/PdoSessionHandler.php
@@ -375,7 +375,11 @@ public function close()
375
$this->gcCalled = false;
376
377
// delete the session records that have expired
378
- $sql = "DELETE FROM $this->table WHERE $this->lifetimeCol < :time - $this->timeCol";
+ if ('mysql' === $this->driver) {
379
+ $sql = "DELETE FROM $this->table WHERE $this->lifetimeCol + $this->timeCol < :time";
380
+ } else {
381
+ $sql = "DELETE FROM $this->table WHERE $this->lifetimeCol < :time - $this->timeCol";
382
+ }
383
384
$stmt = $this->pdo->prepare($sql);
385
$stmt->bindValue(':time', time(), \PDO::PARAM_INT);
0 commit comments