Adds a check that dir() has returned an instance of Directory to FileEngine::_clearDirectory()

This commit is contained in:
Gareth Ellis 2016-10-02 10:59:27 +01:00
parent 1c29577145
commit 5eb9dde78a

View file

@ -267,6 +267,10 @@ class FileEngine extends CacheEngine {
}
$dir = dir($path);
if ($dir === false) {
return;
}
while (($entry = $dir->read()) !== false) {
if (substr($entry, 0, $prefixLength) !== $this->settings['prefix']) {
continue;