From 1da3328bc23ebd6418529035d357481c8c028640 Mon Sep 17 00:00:00 2001 From: Felix Becker Date: Tue, 13 Nov 2018 18:33:11 +0100 Subject: [PATCH] fix: allow rootUri to be null Fixes #684 --- src/LanguageServer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/LanguageServer.php b/src/LanguageServer.php index a30992b..38dfeb1 100644 --- a/src/LanguageServer.php +++ b/src/LanguageServer.php @@ -167,7 +167,7 @@ class LanguageServer extends AdvancedJsonRpc\Dispatcher */ public function initialize(ClientCapabilities $capabilities, string $rootPath = null, int $processId = null, string $rootUri = null): Promise { - if ($rootPath === null) { + if ($rootPath === null && $rootUri !== null) { $rootPath = uriToPath($rootUri); } return coroutine(function () use ($capabilities, $rootPath, $processId) {