Skip to content

Commit f2a9080

Browse files
committed
Merge branch '5.3' into 5.4
* 5.3: fix SQLSRV throws for method_exists()
2 parents e4ff223 + 3276c00 commit f2a9080

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
@@ -270,7 +270,7 @@ public function createTable(): void
270270
$this->addTableToSchema($schema);
271271

272272
foreach ($schema->toSql($conn->getDatabasePlatform()) as $sql) {
273-
if (method_exists($conn, 'executeStatement')) {
273+
if ($conn instanceof Connection && method_exists($conn, 'executeStatement')) {
274274
$conn->executeStatement($sql);
275275
} else {
276276
$conn->exec($sql);
@@ -300,7 +300,7 @@ public function createTable(): void
300300
throw new \DomainException(sprintf('Creating the lock table is currently not implemented for platform "%s".', $driver));
301301
}
302302

303-
if (method_exists($conn, 'executeStatement')) {
303+
if ($conn instanceof Connection && method_exists($conn, 'executeStatement')) {
304304
$conn->executeStatement($sql);
305305
} else {
306306
$conn->exec($sql);
@@ -331,7 +331,7 @@ private function prune(): void
331331
$sql = "DELETE FROM $this->table WHERE $this->expirationCol <= {$this->getCurrentTimestampStatement()}";
332332

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

0 commit comments

Comments
 (0)