Skip to content

Commit

Permalink
Merge pull request #11193 from nextcloud/backport/11188/stable28
Browse files Browse the repository at this point in the history
[stable28] fix(OCC): Fix error reporting and success message when adding a STUN …
  • Loading branch information
nickvergessen authored Dec 11, 2023
2 parents 0287398 + c3ecbb6 commit 0be6c4a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Command/Stun/Add.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
// check input, similar to stun-server.js
$host = parse_url($server, PHP_URL_HOST);
$port = parse_url($server, PHP_URL_PORT);
if (empty($host) || empty($host)) {
if (empty($host) || empty($port)) {
$output->writeln('<error>Incorrect value. Must be stunserver:port.</error>');
return 1;
}
Expand All @@ -70,7 +70,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
$servers[] = "$host:$port";

$this->config->setAppValue('spreed', 'stun_servers', json_encode($servers));
$output->writeln('<info>Added ' . $server . '.</info>');
$output->writeln('<info>Added ' . "$host:$port" . '.</info>');
return 0;
}
}

0 comments on commit 0be6c4a

Please sign in to comment.