From 9e285937b95d3577b7e0d0e9a655bd21a16eace4 Mon Sep 17 00:00:00 2001 From: mauricio lopez Date: Thu, 26 Jul 2012 11:42:25 -0500 Subject: [PATCH] fixed error on oracle db related to clob data. https://github.com/symfony/symfony/issues/3255 --- .../HttpFoundation/SessionStorage/PdoSessionStorage.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Symfony/Component/HttpFoundation/SessionStorage/PdoSessionStorage.php b/src/Symfony/Component/HttpFoundation/SessionStorage/PdoSessionStorage.php index ade60db97f..8c0bd106ab 100644 --- a/src/Symfony/Component/HttpFoundation/SessionStorage/PdoSessionStorage.php +++ b/src/Symfony/Component/HttpFoundation/SessionStorage/PdoSessionStorage.php @@ -181,7 +181,8 @@ class PdoSessionStorage extends NativeSessionStorage $sessionRows = $stmt->fetchAll(\PDO::FETCH_NUM); if (count($sessionRows) == 1) { - return base64_decode($sessionRows[0][0]); + $session = is_resource($sessionRows[0][0]) ? stream_get_contents($sessionRows[0][0]) : $sessionRows[0][0]; + return base64_decode($session); } // session does not exist, create it