diff --git a/src/LanguageServer.php b/src/LanguageServer.php index a30992bc..38dfeb1e 100644 --- a/src/LanguageServer.php +++ b/src/LanguageServer.php @@ -167,7 +167,7 @@ public function __construct(ProtocolReader $reader, ProtocolWriter $writer) */ 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) {