Skip to content
Permalink
Browse files

Adds a check that dir() has returned an instance of Directory to File…

…Engine::_clearDirectory()
  • Loading branch information...
garethellis36 committed Oct 2, 2016
1 parent 1c29577 commit 5eb9dde78a3fe426d6c3bb6ad89627dae85800ca
Showing with 4 additions and 0 deletions.
  1. +4 −0 lib/Cake/Cache/Engine/FileEngine.php
@@ -267,6 +267,10 @@ protected function _clearDirectory($path, $now, $threshold) {
}
$dir = dir($path);
if ($dir === false) {
return;
}
while (($entry = $dir->read()) !== false) {
if (substr($entry, 0, $prefixLength) !== $this->settings['prefix']) {
continue;

0 comments on commit 5eb9dde

Please sign in to comment.
You can’t perform that action at this time.