diff --git a/src/xPDO/Cache/xPDOCacheManager.php b/src/xPDO/Cache/xPDOCacheManager.php index 3bf67986..6e90fd48 100644 --- a/src/xPDO/Cache/xPDOCacheManager.php +++ b/src/xPDO/Cache/xPDOCacheManager.php @@ -495,10 +495,12 @@ public function deleteTree($dirname, $options= array('deleteTop' => false, 'skip } elseif (is_file($path)) { if (is_array($extensions) && !empty($extensions) && !$this->endsWith($file, $extensions)) continue; - if (unlink($path)) { - array_push($result, $path); - } else { - $hasMore= true; + if(file_exists($path)){ + if (unlink($path)) { + array_push($result, $path); + } else { + $hasMore= true; + } } } }