Fix detection of Windows-based server environments
This commit is contained in:
parent
d9393df4fa
commit
a2d0d745ff
@ -7,6 +7,7 @@ Released: -
|
|||||||
```
|
```
|
||||||
* [Changed] Improve documentation
|
* [Changed] Improve documentation
|
||||||
* [Fixed] Improve hostname detection with proxies
|
* [Fixed] Improve hostname detection with proxies
|
||||||
|
* [Fixed] Fix detection of Windows-based server environments
|
||||||
```
|
```
|
||||||
|
|
||||||
### Version 1.0.4
|
### Version 1.0.4
|
||||||
|
@ -1371,7 +1371,7 @@ class Pico
|
|||||||
*/
|
*/
|
||||||
public function getAbsolutePath($path)
|
public function getAbsolutePath($path)
|
||||||
{
|
{
|
||||||
if (strncasecmp(PHP_OS, 'WIN', 3) === 0) {
|
if (DIRECTORY_SEPARATOR === '\\') {
|
||||||
if (preg_match('/^([a-zA-Z]:\\\\|\\\\\\\\)/', $path) !== 1) {
|
if (preg_match('/^([a-zA-Z]:\\\\|\\\\\\\\)/', $path) !== 1) {
|
||||||
$path = $this->getRootDir() . $path;
|
$path = $this->getRootDir() . $path;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user