Browse Source

Fix detection of Windows-based server environments

Daniel Rudolf 8 years ago
parent
commit
a2d0d745ff
2 changed files with 2 additions and 1 deletions
  1. 1 0
      CHANGELOG.md
  2. 1 1
      lib/Pico.php

+ 1 - 0
CHANGELOG.md

@@ -7,6 +7,7 @@ Released: -
 ```
 * [Changed] Improve documentation
 * [Fixed] Improve hostname detection with proxies
+* [Fixed] Fix detection of Windows-based server environments
 ```
 
 ### Version 1.0.4

+ 1 - 1
lib/Pico.php

@@ -1371,7 +1371,7 @@ class Pico
      */
     public function getAbsolutePath($path)
     {
-        if (strncasecmp(PHP_OS, 'WIN', 3) === 0) {
+        if (DIRECTORY_SEPARATOR === '\\') {
             if (preg_match('/^([a-zA-Z]:\\\\|\\\\\\\\)/', $path) !== 1) {
                 $path = $this->getRootDir() . $path;
             }