소스 검색

fixed error on oracle db related to clob data.
https://github.com/symfony/symfony/issues/3255

mauricio lopez 13 년 전
부모
커밋
9e285937b9
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      src/Symfony/Component/HttpFoundation/SessionStorage/PdoSessionStorage.php

+ 2 - 1
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