Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/jsxc.nextcloud.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsualko <klaus@jsxc.org>2020-12-28 14:17:48 +0300
committersualko <klaus@jsxc.org>2020-12-28 14:17:48 +0300
commit8449b1fd08d76bb074feaab0548384b5666f508d (patch)
tree9806172bfbcbdb0d650095ba61c05688341e3ec8
parent8a9f744906194ebcb2a30ed303215789848301a8 (diff)
fix(internal): undefined host key
fix jsxc/jsxc#966
-rw-r--r--lib/Controller/SettingsController.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/Controller/SettingsController.php b/lib/Controller/SettingsController.php
index 3d3d9a1..a43ae60 100644
--- a/lib/Controller/SettingsController.php
+++ b/lib/Controller/SettingsController.php
@@ -59,7 +59,11 @@ class SettingsController extends Controller
if ($serverType === Application::INTERNAL) {
$serverHost = $this->request->getServerHost();
- $domain = parse_url($serverHost)['host'];
+ $domain = parse_url($serverHost, PHP_URL_HOST);
+
+ if ($domain === null) {
+ $domain = !empty($serverHost) ? $serverHost : 'jsxc.nextcloud';
+ }
$data['xmpp'] = [
'defaultDomain' => $domain,