Skip to content

Commit

Permalink
Merge branch '3.4' into 4.4
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
nicolas-grekas committed Jul 12, 2020
2 parents 4d44187 + c537472 commit 7ddc6df
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions Store/PdoStore.php
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,11 @@ public function createTable(): void
$table->setPrimaryKey([$this->idCol]);

foreach ($schema->toSql($conn->getDatabasePlatform()) as $sql) {
$conn->exec($sql);
if (method_exists($conn, 'executeStatement')) {
$conn->executeStatement($sql);
} else {
$conn->exec($sql);
}
}

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

$conn->exec($sql);
if (method_exists($conn, 'executeStatement')) {
$conn->executeStatement($sql);
} else {
$conn->exec($sql);
}
}

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

$this->getConnection()->exec($sql);
$conn = $this->getConnection();
if (method_exists($conn, 'executeStatement')) {
$conn->executeStatement($sql);
} else {
$conn->exec($sql);
}
}

private function getDriver(): string
Expand Down

0 comments on commit 7ddc6df

Please sign in to comment.