From 3f8e8c9fbda9e6b64b3dc87d7c34ee8a13b2a965 Mon Sep 17 00:00:00 2001 From: Johannes Schmitt Date: Mon, 19 Sep 2011 23:16:57 +0200 Subject: [PATCH] fixes a session max lifetime handling --- .../Bridge/Doctrine/HttpFoundation/DbalSessionStorage.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Symfony/Bridge/Doctrine/HttpFoundation/DbalSessionStorage.php b/src/Symfony/Bridge/Doctrine/HttpFoundation/DbalSessionStorage.php index 95310ac34f..8faf528a7c 100644 --- a/src/Symfony/Bridge/Doctrine/HttpFoundation/DbalSessionStorage.php +++ b/src/Symfony/Bridge/Doctrine/HttpFoundation/DbalSessionStorage.php @@ -3,7 +3,6 @@ namespace Symfony\Bridge\Doctrine\HttpFoundation; use Doctrine\DBAL\Platforms\MySqlPlatform; - use Symfony\Component\HttpFoundation\SessionStorage\NativeSessionStorage; use Doctrine\DBAL\Driver\Connection; @@ -107,7 +106,7 @@ class DbalSessionStorage extends NativeSessionStorage { try { $this->con->executeQuery("DELETE FROM {$this->tableName} WHERE sess_time < :time", array( - 'time' => time() - $this->options['lifetime'], + 'time' => time() - $lifetime, )); } catch (\PDOException $e) { throw new \RuntimeException(sprintf('PDOException was thrown when trying to manipulate session data: %s', $e->getMessage()), 0, $e);