diff --git a/web/modules/custom/etherpad_api/src/Client.php b/web/modules/custom/etherpad_api/src/Client.php index 975aa74..daa88e3 100644 --- a/web/modules/custom/etherpad_api/src/Client.php +++ b/web/modules/custom/etherpad_api/src/Client.php @@ -41,12 +41,15 @@ class Client { public function __construct(ClientInterface $httpClient, ImmutableConfig $config) { $this->httpClient = $httpClient; $this->config = $config; - $this->baseUrl = rtrim($config->get('url'), '/'); + $this->baseUrl = $config->get('url') ? rtrim($config->get('url'), '/') : null; $this->apiKey = $config->get('key'); } public function checkToken() { - return $this->request('get', 'checkToken'); + if ($this->baseUrl) { + return $this->request('checkToken'); + } + return false; } /**