[Cache] fix compat with doctrine/dbal v3

This commit is contained in:
Nicolas Grekas 2020-06-09 13:48:38 +02:00
parent e26d5f217b
commit 0f76308929
1 changed files with 2 additions and 2 deletions

View File

@ -337,9 +337,9 @@ trait PdoTrait
}
foreach ($serialized as $id => $data) {
$stmt->execute();
$result = $stmt->execute();
if (null === $driver && !$stmt->rowCount()) {
if (null === $driver && !($result instanceof Result ? $result : $stmt)->rowCount()) {
try {
$insertStmt->execute();
} catch (DBALException $e) {