8000 [Cache] fix compat with doctrine/dbal v3 · symfony/cache@5d8f70d · GitHub
[go: up one dir, main page]

Skip to content

Commit 5d8f70d

Browse files
[Cache] fix compat with doctrine/dbal v3
1 parent 7413142 commit 5d8f70d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Traits/PdoTrait.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -337,9 +337,9 @@ protected function doSave(array $values, $lifetime)
337337
}
338338

339339
foreach ($serialized as $id => $data) {
340-
$stmt->execute();
340+
$result = $stmt->execute();
341341

342-
if (null === $driver && !$stmt->rowCount()) {
342+
if (null === $driver && !($result instanceof Result ? $result : $stmt)->rowCount()) {
343343
try {
344344
$insertStmt->execute();
345345
} catch (DBALException $e) {

0 commit comments

Comments
 (0)
0