[Debug] Replaced logic for detecting filesystem case sensitivity
This commit is contained in:
parent
b228378d1f
commit
2e81b0a944
@ -51,7 +51,16 @@ class DebugClassLoader
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!isset(self::$caseCheck)) {
|
if (!isset(self::$caseCheck)) {
|
||||||
self::$caseCheck = false !== stripos(PHP_OS, 'win') ? (false !== stripos(PHP_OS, 'darwin') ? 2 : 1) : 0;
|
if(!file_exists(strtolower(__FILE__))) {
|
||||||
|
// filesystem is case sensitive
|
||||||
|
self::$caseCheck = 0;
|
||||||
|
} elseif(realpath(strtolower(__FILE__)) === __FILE__) {
|
||||||
|
// filesystem is not case sensitive
|
||||||
|
self::$caseCheck = 1;
|
||||||
|
} else {
|
||||||
|
// filesystem is not case sensitive AND realpath() fails to normalize case
|
||||||
|
self::$caseCheck = 2;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user