Skip to content

Commit

Permalink
Issue #56: Avoid php notice for missing config keys.
Browse files Browse the repository at this point in the history
  • Loading branch information
donquixote committed Dec 3, 2024
1 parent 3191945 commit 2023e61
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Cool/CollaboraDiscoveryFetcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public function getDiscoveryXml(): string {
$discovery_url = $this->getWopiClientServerBaseUrl() . '/hosting/discovery';

$cool_settings = $this->loadSettings();
$disable_checks = (bool) $cool_settings['disable_cert_check'];
$disable_checks = !empty($cool_settings['disable_cert_check']);

try {
$response = $this->httpClient->get($discovery_url, [
Expand Down Expand Up @@ -88,7 +88,7 @@ public function getDiscoveryXml(): string {
*/
protected function getWopiClientServerBaseUrl(): string {
$cool_settings = $this->loadSettings();
$wopi_client_server = $cool_settings['server'];
$wopi_client_server = $cool_settings['server'] ?? NULL;
if (!$wopi_client_server) {
throw new CollaboraNotAvailableException(
'Collabora Online server address is not valid.',
Expand Down

0 comments on commit 2023e61

Please sign in to comment.