Skip to content

Commit 1b36f9a

Browse files
committed
Update CachePoolChain.php
1 parent 0c1de9c commit 1b36f9a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

CachePoolChain.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ public function save(CacheItemInterface $item)
245245
$result = true;
246246
foreach ($this->getPools() as $poolKey => $pool) {
247247
try {
248-
$result = $result && $pool->save($item);
248+
$result = $pool->save($item) && $result;
249249
} catch (CachePoolException $e) {
250250
$this->handleException($poolKey, __FUNCTION__, $e);
251251
}
@@ -262,7 +262,7 @@ public function saveDeferred(CacheItemInterface $item)
262262
$result = true;
263263
foreach ($this->getPools() as $poolKey => $pool) {
264264
try {
265-
$result = $result && $pool->saveDeferred($item);
265+
$result = $pool->saveDeferred($item) && $result;
266266
} catch (CachePoolException $e) {
267267
$this->handleException($poolKey, __FUNCTION__, $e);
268268
}
@@ -279,7 +279,7 @@ public function commit()
279279
$result = true;
280280
foreach ($this->getPools() as $poolKey => $pool) {
281281
try {
282-
$result = $result && $pool->commit();
282+
$result = $pool->commit() && $result;
283283
} catch (CachePoolException $e) {
284284
$this->handleException($poolKey, __FUNCTION__, $e);
285285
}
@@ -297,7 +297,7 @@ public function clearTags(array $tags)
297297
foreach ($this->getPools() as $poolKey => $pool) {
298298
if ($pool instanceof TaggablePoolInterface) {
299299
try {
300-
$result = $result && $pool->clearTags($tags);
300+
$result = $pool->clearTags($tags) && $result;
301301
} catch (CachePoolException $e) {
302302
$this->handleException($poolKey, __FUNCTION__, $e);
303303
}

0 commit comments

Comments
 (0)