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

github.com/nextcloud/spreed.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2017-09-29 12:56:22 +0300
committerJoas Schilling <coding@schilljs.com>2017-09-29 12:56:22 +0300
commitfb766fb1a5f8df9ed1b9842c50bfb98dec8a35b4 (patch)
tree0459ef4bd99ec31f2568fd10623067c44fcb1616 /lib/Config.php
parentc26d958b981268f243d46422bc1b23939630140d (diff)
Fix unit tests
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/Config.php')
-rw-r--r--lib/Config.php8
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' => '',