mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Adds a check that dir() has returned an instance of Directory to FileEngine::_clearDirectory()
This commit is contained in:
parent
1c29577145
commit
5eb9dde78a
1 changed files with 4 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue