Skip to content

Commit 571b26a

Browse files
authored
Use php_uname() instead of PHP_OS (#283)
1 parent 3c11cde commit 571b26a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Cache/FileSystemCache.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class FileSystemCache implements Cache
1818

1919
public function __construct()
2020
{
21-
if (PHP_OS === 'WINNT') {
21+
if (strtoupper(substr(php_uname('s'), 0, 3)) === 'WIN') {
2222
$this->cacheDir = getenv('LOCALAPPDATA') . '\\PHP Language Server\\';
2323
} else if (getenv('XDG_CACHE_HOME')) {
2424
$this->cacheDir = getenv('XDG_CACHE_HOME') . '/phpls/';

0 commit comments

Comments
 (0)