Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit ff29a1a

Browse filesBrowse files
committed
minor #52666 [Cache] name exception being caught as it is accessed in the catch block (xabbuh)
This PR was merged into the 6.3 branch. Discussion ---------- [Cache] name exception being caught as it is accessed in the catch block | Q | A | ------------- | --- | Branch? | 6.3 | Bug fix? | yes | New feature? | no | Deprecations? | no | Issues | | License | MIT Commits ------- 75781d0 name exception being caught as it is accessed in the catch block
2 parents 861d85f + 75781d0 commit ff29a1a
Copy full SHA for ff29a1a

File tree

1 file changed

+2
-2
lines changed
Filter options

1 file changed

+2
-2
lines changed

‎src/Symfony/Component/Cache/Adapter/PdoAdapter.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Cache/Adapter/PdoAdapter.php
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ protected function doSave(array $values, int $lifetime): array|bool
285285
$lifetime = $lifetime ?: null;
286286
try {
287287
$stmt = $conn->prepare($sql);
288-
} catch (\PDOException) {
288+
} catch (\PDOException $e) {
289289
if ($this->isTableMissing($e) && (!$conn->inTransaction() || \in_array($this->driver, ['pgsql', 'sqlite', 'sqlsrv'], true))) {
290290
$this->createTable();
291291
}
@@ -320,7 +320,7 @@ protected function doSave(array $values, int $lifetime): array|bool
320320
foreach ($values as $id => $data) {
321321
try {
322322
$stmt->execute();
323-
} catch (\PDOException) {
323+
} catch (\PDOException $e) {
324324
if ($this->isTableMissing($e) && (!$conn->inTransaction() || \in_array($this->driver, ['pgsql', 'sqlite', 'sqlsrv'], true))) {
325325
$this->createTable();
326326
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.