File tree 1 file changed +10
-4
lines changed
src/Symfony/Component/Cache/Traits 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -108,8 +108,11 @@ public function clear()
108
108
try {
109
109
if ($ cleared = $ this ->versioningIsEnabled ) {
110
110
$ namespaceVersion = 2 ;
111
- foreach ($ this ->doFetch (array ('@ ' .$ this ->namespace )) as $ v ) {
112
- $ namespaceVersion = 1 + (int ) $ v ;
111
+ try {
112
+ foreach ($ this ->doFetch (array ('@ ' .$ this ->namespace )) as $ v ) {
113
+ $ namespaceVersion = 1 + (int ) $ v ;
114
+ }
115
+ } catch (\Exception $ e ) {
113
116
}
114
117
$ namespaceVersion .= ': ' ;
115
118
$ cleared = $ this ->doSave (array ('@ ' .$ this ->namespace => $ namespaceVersion ), 0 );
@@ -236,8 +239,11 @@ private function getId($key)
236
239
237
240
if ($ this ->versioningIsEnabled && '' === $ this ->namespaceVersion ) {
238
241
$ this ->namespaceVersion = '1: ' ;
239
- foreach ($ this ->doFetch (array ('@ ' .$ this ->namespace )) as $ v ) {
240
- $ this ->namespaceVersion = $ v ;
242
+ try {
243
+ foreach ($ this ->doFetch (array ('@ ' .$ this ->namespace )) as $ v ) {
244
+ $ this ->namespaceVersion = $ v ;
245
+ }
246
+ } catch (\Exception $ e ) {
241
247
}
242
248
}
243
249
You can’t perform that action at this time.
0 commit comments