diff --git a/src/Config.php b/src/Config.php index 9da67a8..e055d07 100644 --- a/src/Config.php +++ b/src/Config.php @@ -16,18 +16,18 @@ function locate() { - $alreadyRead = []; + $alreadyChecked = []; $paths = array_map('dirname', get_included_files()); $paths[] = dirname($_SERVER['PHP_SELF']); $paths[] = getcwd(); foreach ($paths as $path) { while (dirname($path) !== $path) { $file = $path . DIRECTORY_SEPARATOR . FILE_NAME; - if (is_file($file) && !isset($alreadyRead[$file])) { + if (!isset($alreadyChecked[$file]) && is_file($file)) { read($file); State::$timestamp = max(filemtime($file), State::$timestamp); - $alreadyRead[$file] = true; } + $alreadyChecked[$file] = true; $path = dirname($path); } }