Skip to content

Commit 1da896d

Browse files
committed
merged branch diaspar/2.0-pdosessionstorage-issue3255 (PR symfony#5070)
Commits ------- 9e28593 fixed error on oracle db related to clob data. symfony#3255 Discussion ---------- fixed error on pdosession storage for oracle db. Related to clob data Did a change on 2.0 branch to fix this error symfony#3255 Tested on mysql and Oracle DB. I also ran a phpunit test before commit: phpunit tests/Symfony/Tests/Component/HttpFoundation/SessionStorage/PdoSessionStorageTest.php PHPUnit 3.6.10 by Sebastian Bergmann. Time: 0 seconds, Memory: 2.75Mb OK (3 tests, 5 assertions) Time: 0 seconds, Memory: 2.75Mb
2 parents d92daec + 9e28593 commit 1da896d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Symfony/Component/HttpFoundation/SessionStorage/PdoSessionStorage.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,8 @@ public function sessionRead($id)
181181
$sessionRows = $stmt->fetchAll(\PDO::FETCH_NUM);
182182

183183
if (count($sessionRows) == 1) {
184-
return base64_decode($sessionRows[0][0]);
184+
$session = is_resource($sessionRows[0][0]) ? stream_get_contents($sessionRows[0][0]) : $sessionRows[0][0];
185+
return base64_decode($session);
185186
}
186187

187188
// session does not exist, create it

0 commit comments

Comments
 (0)