diff --git a/lib/Cake/Cache/Engine/FileEngine.php b/lib/Cake/Cache/Engine/FileEngine.php index 684ab1583d0..43eddc5b28b 100644 --- a/lib/Cake/Cache/Engine/FileEngine.php +++ b/lib/Cake/Cache/Engine/FileEngine.php @@ -275,7 +275,11 @@ protected function _clearDirectory($path, $now, $threshold) { if (!file_exists($filePath) || is_dir($filePath)) { continue; } - $file = new SplFileObject($path . $entry, 'r'); + try { + $file = new SplFileObject($path . $entry, 'r'); + } catch (RuntimeException $e) { + continue; + } if ($threshold) { $mtime = $file->getMTime();