From 14b9fa5234efab109299c6eeabd1df04a3fb2728 Mon Sep 17 00:00:00 2001 From: Ben Davies Date: Thu, 31 Jan 2019 15:08:08 +0000 Subject: [PATCH] fix pruning pdo cache for vendors that throw on execute --- src/Symfony/Component/Cache/Traits/PdoTrait.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Component/Cache/Traits/PdoTrait.php b/src/Symfony/Component/Cache/Traits/PdoTrait.php index af1a7b22f6..ec34e72fb5 100644 --- a/src/Symfony/Component/Cache/Traits/PdoTrait.php +++ b/src/Symfony/Component/Cache/Traits/PdoTrait.php @@ -165,8 +165,11 @@ trait PdoTrait if ('' !== $this->namespace) { $delete->bindValue(':namespace', sprintf('%s%%', $this->namespace), \PDO::PARAM_STR); } - - return $delete->execute(); + try { + return $delete->execute(); + } catch (TableNotFoundException $e) { + return true; + } } /**