diff --git a/system/Cache/Handlers/FileHandler.php b/system/Cache/Handlers/FileHandler.php index a86a45e83d00..fd0630a9982c 100644 --- a/system/Cache/Handlers/FileHandler.php +++ b/system/Cache/Handlers/FileHandler.php @@ -337,13 +337,13 @@ protected function getDirFileInfo(string $sourceDir, bool $topLevelOnly = true, $relativePath = $sourceDir; if ($fp = @opendir($sourceDir)) { - // reset the array and make sure $source_dir has a trailing slash on the initial call + // reset the array and make sure $sourceDir has a trailing slash on the initial call if ($_recursion === false) { $_filedata = []; $sourceDir = rtrim(realpath($sourceDir) ?: $sourceDir, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR; } - // Used to be foreach (scandir($source_dir, 1) as $file), but scandir() is simply not as fast + // Used to be foreach (scandir($sourceDir, 1) as $file), but scandir() is simply not as fast while (false !== ($file = readdir($fp))) { if (is_dir($sourceDir . $file) && $file[0] !== '.' && $topLevelOnly === false) { $this->getDirFileInfo($sourceDir . $file . DIRECTORY_SEPARATOR, $topLevelOnly, true);