diff options
author | Joas Schilling <coding@schilljs.com> | 2017-09-29 12:56:22 +0300 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2017-09-29 12:56:22 +0300 |
commit | fb766fb1a5f8df9ed1b9842c50bfb98dec8a35b4 (patch) | |
tree | 0459ef4bd99ec31f2568fd10623067c44fcb1616 /lib/Config.php | |
parent | c26d958b981268f243d46422bc1b23939630140d (diff) |
Fix unit tests
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/Config.php')
-rw-r--r-- | lib/Config.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Config.php b/lib/Config.php index b87e18f0c..c3bf358c5 100644 --- a/lib/Config.php +++ b/lib/Config.php @@ -47,8 +47,8 @@ class Config { * @return string */ public function getStunServer() { - $config = $this->config->getAppValue('spreed', 'stun_servers', 'stun.nextcloud.com:443'); - $servers = json_decode($config); + $config = $this->config->getAppValue('spreed', 'stun_servers', json_encode(['stun.nextcloud.com:443'])); + $servers = json_decode($config, true); if ($servers === null) { return $config ?: 'stun.nextcloud.com:443'; @@ -69,9 +69,9 @@ class Config { */ public function getTurnSettings() { $config = $this->config->getAppValue('spreed', 'turn_servers'); - $servers = json_decode($config); + $servers = json_decode($config, true); - if ($servers === null || !empty($servers) || !is_array($servers)) { + if ($servers === null || empty($servers) || !is_array($servers)) { return [ 'server' => '', 'username' => '', |