瀏覽代碼

[HttpFoundation][Session] Fix bug in PDO Session Storage with SQLSRV making assumptions about parameters with length being OUTPUT not INPUT parameters.

Benjamin Eberlei 13 年之前
父節點
當前提交
dc2d5a0581
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/Symfony/Component/HttpFoundation/SessionStorage/PdoSessionStorage.php

+ 1 - 1
src/Symfony/Component/HttpFoundation/SessionStorage/PdoSessionStorage.php

@@ -173,7 +173,7 @@ class PdoSessionStorage extends NativeSessionStorage
             $sql = "SELECT $dbDataCol FROM $dbTable WHERE $dbIdCol = :id";
 
             $stmt = $this->db->prepare($sql);
-            $stmt->bindParam(':id', $id, \PDO::PARAM_STR, 255);
+            $stmt->bindParam(':id', $id, \PDO::PARAM_STR);
 
             $stmt->execute();
             // it is recommended to use fetchAll so that PDO can close the DB cursor