1
0
Fork 0

Use php_uname() instead of PHP_OS (#283)

pull/281/head
Felix Becker 2017-02-06 16:42:45 +01:00 committed by GitHub
parent 3c11cde9fb
commit 571b26a0c3
1 changed files with 1 additions and 1 deletions

View File

@ -18,7 +18,7 @@ class FileSystemCache implements Cache
public function __construct()
{
if (PHP_OS === 'WINNT') {
if (strtoupper(substr(php_uname('s'), 0, 3)) === 'WIN') {
$this->cacheDir = getenv('LOCALAPPDATA') . '\\PHP Language Server\\';
} else if (getenv('XDG_CACHE_HOME')) {
$this->cacheDir = getenv('XDG_CACHE_HOME') . '/phpls/';