Skip to content

Commit 7ddc6df

Browse files
Merge branch '3.4' into 4.4
* 3.4: Fix DBAL deprecation [Form] Fix ChoiceType translation domain Add Tagalog translations for new form messages [Form] Add missing vietnamese translations sync translations from master add vietnamese translation for html5 color validation
2 parents 4d44187 + c537472 commit 7ddc6df

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

Store/PdoStore.php

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,11 @@ public function createTable(): void
267267
$table->setPrimaryKey([$this->idCol]);
268268

269269
foreach ($schema->toSql($conn->getDatabasePlatform()) as $sql) {
270-
$conn->exec($sql);
270+
if (method_exists($conn, 'executeStatement')) {
271+
$conn->executeStatement($sql);
272+
} else {
273+
$conn->exec($sql);
274+
}
271275
}
272276

273277
return;
@@ -293,7 +297,11 @@ public function createTable(): void
293297
throw new \DomainException(sprintf('Creating the lock table is currently not implemented for PDO driver "%s".', $driver));
294298
}
295299

296-
$conn->exec($sql);
300+
if (method_exists($conn, 'executeStatement')) {
301+
$conn->executeStatement($sql);
302+
} else {
303+
$conn->exec($sql);
304+
}
297305
}
298306

299307
/**
@@ -303,7 +311,12 @@ private function prune(): void
303311
{
304312
$sql = "DELETE FROM $this->table WHERE $this->expirationCol <= {$this->getCurrentTimestampStatement()}";
305313

306-
$this->getConnection()->exec($sql);
314+
$conn = $this->getConnection();
315+
if (method_exists($conn, 'executeStatement')) {
316+
$conn->executeStatement($sql);
317+
} else {
318+
$conn->exec($sql);
319+
}
307320
}
308321

309322
private function getDriver(): string

0 commit comments

Comments
 (0)