Skip to content

Commit da24bc9

Browse files
committed
[HttpFoundation] fix switch statement
1 parent fe01d10 commit da24bc9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/HttpFoundation/Session/Storage/Handler/PdoSessionHandler.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ private function getMergeSql()
242242
return "MERGE INTO $this->table USING DUAL ON ($this->idCol = :id) " .
243243
"WHEN NOT MATCHED THEN INSERT ($this->idCol, $this->dataCol, $this->timeCol) VALUES (:id, :data, :time) " .
244244
"WHEN MATCHED THEN UPDATE SET $this->dataCol = :data, $this->timeCol = :time";
245-
case 'sqlsrv' && version_compare($this->pdo->getAttribute(\PDO::ATTR_SERVER_VERSION), '10', '>='):
245+
case 'sqlsrv' === $driver && version_compare($this->pdo->getAttribute(\PDO::ATTR_SERVER_VERSION), '10', '>='):
246246
// MERGE is only available since SQL Server 2008 and must be terminated by semicolon
247247
// It also requires HOLDLOCK according to http://weblogs.sqlteam.com/dang/archive/2009/01/31/UPSERT-Race-Condition-With-MERGE.aspx
248248
return "MERGE INTO $this->table WITH (HOLDLOCK) USING (SELECT 1 AS dummy) AS src ON ($this->idCol = :id) " .

0 commit comments

Comments
 (0)