We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 1bf183a + 7b161ee commit 4cecc74Copy full SHA for 4cecc74
src/Config.php
@@ -16,18 +16,18 @@
16
17
function locate()
18
{
19
- $alreadyRead = [];
+ $alreadyChecked = [];
20
$paths = array_map('dirname', get_included_files());
21
$paths[] = dirname($_SERVER['PHP_SELF']);
22
$paths[] = getcwd();
23
foreach ($paths as $path) {
24
while (dirname($path) !== $path) {
25
$file = $path . DIRECTORY_SEPARATOR . FILE_NAME;
26
- if (is_file($file) && !isset($alreadyRead[$file])) {
+ if (!isset($alreadyChecked[$file]) && is_file($file)) {
27
read($file);
28
State::$timestamp = max(filemtime($file), State::$timestamp);
29
- $alreadyRead[$file] = true;
30
}
+ $alreadyChecked[$file] = true;
31
$path = dirname($path);
32
33
0 commit comments