From cbc495f8f20cb3c226a5cffd4c9b6b81494afc8b Mon Sep 17 00:00:00 2001 From: Andi Fahruddin Akas <57283157+andifahruddinakas@users.noreply.github.com> Date: Mon, 16 Dec 2024 00:32:21 +0800 Subject: [PATCH] Update FileHandler.php --- system/Cache/Handlers/FileHandler.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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);