Skip to content

Commit 3276c00

Browse files
committed
Merge branch '4.4' into 5.3
* 4.4: fix SQLSRV throws for method_exists()
2 parents a78fda5 + 567d29b commit 3276c00

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Store/PdoStore.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ public function createTable(): void
272272
$this->addTableToSchema($schema);
273273

274274
foreach ($schema->toSql($conn->getDatabasePlatform()) as $sql) {
275-
if (method_exists($conn, 'executeStatement')) {
275+
if ($conn instanceof Connection && method_exists($conn, 'executeStatement')) {
276276
$conn->executeStatement($sql);
277277
} else {
278278
$conn->exec($sql);
@@ -302,7 +302,7 @@ public function createTable(): void
302302
throw new \DomainException(sprintf('Creating the lock table is currently not implemented for PDO driver "%s".', $driver));
303303
}
304304

305-
if (method_exists($conn, 'executeStatement')) {
305+
if ($conn instanceof Connection && method_exists($conn, 'executeStatement')) {
306306
$conn->executeStatement($sql);
307307
} else {
308308
$conn->exec($sql);
@@ -333,7 +333,7 @@ private function prune(): void
333333
$sql = "DELETE FROM $this->table WHERE $this->expirationCol <= {$this->getCurrentTimestampStatement()}";
334334

335335
$conn = $this->getConnection();
336-
if (method_exists($conn, 'executeStatement')) {
336+
if ($conn instanceof Connection && method_exists($conn, 'executeStatement')) {
337337
$conn->executeStatement($sql);
338338
} else {
339339
$conn->exec($sql);

0 commit comments

Comments
 (0)