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 4e4ebde

Browse filesBrowse files
bug #30050 [Cache] fix pruning pdo cache for vendors that throw on execute (bendavies)
This PR was merged into the 4.2 branch. Discussion ---------- [Cache] fix pruning pdo cache for vendors that throw on execute | Q | A | ------------- | --- | Branch? | 4.2 | Bug fix? | yes | New feature? | no | BC breaks? | no > | Deprecations? | no | Tests pass? | yes | Fixed tickets | | License | MIT | Doc PR | This additionally fixes pruning of the PdoAdapter when the table does not exist. Similar to #29900 #30005 and f419851 Commits ------- 14b9fa5 fix pruning pdo cache for vendors that throw on execute
2 parents 4f6541e + 14b9fa5 commit 4e4ebde
Copy full SHA for 4e4ebde

File tree

Expand file treeCollapse file tree

1 file changed

+5
-2
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+5
-2
lines changed

‎src/Symfony/Component/Cache/Traits/PdoTrait.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Cache/Traits/PdoTrait.php
+5-2Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,8 +165,11 @@ public function prune()
165165
if ('' !== $this->namespace) {
166166
$delete->bindValue(':namespace', sprintf('%s%%', $this->namespace), \PDO::PARAM_STR);
167167
}
168-
169-
return $delete->execute();
168+
try {
169+
return $delete->execute();
170+
} catch (TableNotFoundException $e) {
171+
return true;
172+
}
170173
}
171174

172175
/**

0 commit comments

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