diff --git a/src/Cool/CoolRequest.php b/src/Cool/CoolRequest.php index 73c6a9b3..5f2701ce 100644 --- a/src/Cool/CoolRequest.php +++ b/src/Cool/CoolRequest.php @@ -140,36 +140,36 @@ public function getWopiClientURL() { $wopi_client_server = $default_config->get('cool')['server']; if (!$wopi_client_server) { $this->error_code = 201; - return; + return NULL; } $wopi_client_server = trim($wopi_client_server); if (!strStartsWith($wopi_client_server, 'http')) { $this->error_code = 204; - return; + return NULL; } if (!strStartsWith($wopi_client_server, $_HOST_SCHEME . '://')) { $this->error_code = 202; - return; + return NULL; } $discovery = getDiscovery($wopi_client_server); if ($discovery === false) { $this->error_code = 203; - return; + return NULL; } $discovery_parsed = simplexml_load_string($discovery); if (!$discovery_parsed) { $this->error_code = 102; - return; + return NULL; } $this->wopi_src = strval(getWopiSrcUrl($discovery_parsed, 'text/plain')[0]); if (!$this->wopi_src) { $this->error_code = 103; - return; + return NULL; } return $this->wopi_src;