Skip to content

Commit fcc4de5

Browse files
committed
fix: Cache FileHandler error when there is a folder in cache dir
ErrorException: Automatic conversion of false to array is deprecated
1 parent 2be50cc commit fcc4de5

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)