Skip to content

Commit 3bbe1da

Browse files
authored
Merge pull request #7361 from kenjis/fix-Cache-FileHandler-error
fix: Cache FileHandler error when there is a folder in cache dir
2 parents 1739d51 + fcc4de5 commit 3bbe1da

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

system/Cache/Handlers/FileHandler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ protected function getDirFileInfo(string $sourceDir, bool $topLevelOnly = true,
346346
while (false !== ($file = readdir($fp))) {
347347
if (is_dir($sourceDir . $file) && $file[0] !== '.' && $topLevelOnly === false) {
348348
$this->getDirFileInfo($sourceDir . $file . DIRECTORY_SEPARATOR, $topLevelOnly, true);
349-
} elseif ($file[0] !== '.') {
349+
} elseif (! is_dir($sourceDir . $file) && $file[0] !== '.') {
350350
$_filedata[$file] = $this->getFileInfo($sourceDir . $file);
351351
$_filedata[$file]['relative_path'] = $relativePath;
352352
}

0 commit comments

Comments
 (0)