Use php_uname() instead of PHP_OS
parent
5100d89617
commit
89c6e4bf2e
|
@ -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/';
|
||||
|
|
Loading…
Reference in New Issue