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 8b3a1df

Browse filesBrowse files
committed
[Cache] Make sure PdoAdapter::prune() always returns a bool
Signed-off-by: Alexander M. Turek <me@derrabus.de>
1 parent ad64124 commit 8b3a1df
Copy full SHA for 8b3a1df

File tree

1 file changed

+7
-0
lines changed
Filter options

1 file changed

+7
-0
lines changed

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

Copy file name to clipboardExpand all lines: src/Symfony/Component/Cache/Adapter/PdoAdapter.php
+7Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
use Doctrine\DBAL\Exception\TableNotFoundException;
2020
use Doctrine\DBAL\ParameterType;
2121
use Doctrine\DBAL\Schema\Schema;
22+
use Doctrine\DBAL\Statement;
2223
use Symfony\Component\Cache\Exception\InvalidArgumentException;
2324
use Symfony\Component\Cache\Marshaller\DefaultMarshaller;
2425
use Symfony\Component\Cache\Marshaller\MarshallerInterface;
@@ -208,6 +209,12 @@ public function prune()
208209
$delete->bindValue(':namespace', sprintf('%s%%', $this->namespace), $useDbalConstants ? ParameterType::STRING : \PDO::PARAM_STR);
209210
}
210211
try {
212+
if ($delete instanceof Statement) {
213+
$delete->executeStatement();
214+
215+
return true;
216+
}
217+
211218
return $delete->execute();
212219
} catch (TableNotFoundException $e) {
213220
return true;

0 commit comments

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