merged branch diaspar/2.0-pdosessionstorage-issue3255 (PR #5070)
Commits
-------
9e28593
fixed error on oracle db related to clob data. https://github.com/symfony/symfony/issues/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
https://github.com/symfony/symfony/issues/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
This commit is contained in:
commit
1da896dc7e
@ -181,7 +181,8 @@ class PdoSessionStorage extends NativeSessionStorage
|
|||||||
$sessionRows = $stmt->fetchAll(\PDO::FETCH_NUM);
|
$sessionRows = $stmt->fetchAll(\PDO::FETCH_NUM);
|
||||||
|
|
||||||
if (count($sessionRows) == 1) {
|
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
|
// session does not exist, create it
|
||||||
|
Reference in New Issue
Block a user