Merge branch '3.4' into 4.4
* 3.4: [Cache] fix compat with doctrine/dbal v3
This commit is contained in:
commit
1c328c64ad
|
@ -364,19 +364,19 @@ trait PdoTrait
|
||||||
|
|
||||||
foreach ($values as $id => $data) {
|
foreach ($values as $id => $data) {
|
||||||
try {
|
try {
|
||||||
$stmt->execute();
|
$result = $stmt->execute();
|
||||||
} catch (TableNotFoundException $e) {
|
} catch (TableNotFoundException $e) {
|
||||||
if (!$conn->isTransactionActive() || \in_array($this->driver, ['pgsql', 'sqlite', 'sqlsrv'], true)) {
|
if (!$conn->isTransactionActive() || \in_array($this->driver, ['pgsql', 'sqlite', 'sqlsrv'], true)) {
|
||||||
$this->createTable();
|
$this->createTable();
|
||||||
}
|
}
|
||||||
$stmt->execute();
|
$result = $stmt->execute();
|
||||||
} catch (\PDOException $e) {
|
} catch (\PDOException $e) {
|
||||||
if (!$conn->inTransaction() || \in_array($this->driver, ['pgsql', 'sqlite', 'sqlsrv'], true)) {
|
if (!$conn->inTransaction() || \in_array($this->driver, ['pgsql', 'sqlite', 'sqlsrv'], true)) {
|
||||||
$this->createTable();
|
$this->createTable();
|
||||||
}
|
}
|
||||||
$stmt->execute();
|
$result = $stmt->execute();
|
||||||
}
|
}
|
||||||
if (null === $driver && !$stmt->rowCount()) {
|
if (null === $driver && !($result instanceof Result ? $result : $stmt)->rowCount()) {
|
||||||
try {
|
try {
|
||||||
$insertStmt->execute();
|
$insertStmt->execute();
|
||||||
} catch (DBALException $e) {
|
} catch (DBALException $e) {
|
||||||
|
|
Reference in New Issue