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

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'core/Command/Config/ListConfigs.php')
-rw-r--r--core/Command/Config/ListConfigs.php10
1 files changed, 8 insertions, 2 deletions
diff --git a/core/Command/Config/ListConfigs.php b/core/Command/Config/ListConfigs.php
index 2394811f517..b19a09cec97 100644
--- a/core/Command/Config/ListConfigs.php
+++ b/core/Command/Config/ListConfigs.php
@@ -3,6 +3,7 @@
* @copyright Copyright (c) 2016, ownCloud, Inc.
*
* @author Joas Schilling <coding@schilljs.com>
+ * @author Roeland Jago Douma <roeland@famdouma.nl>
*
* @license AGPL-3.0
*
@@ -19,7 +20,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>
*
*/
-
namespace OC\Core\Command\Config;
use OC\Core\Command\Base;
@@ -71,10 +71,15 @@ class ListConfigs extends Base {
;
}
- protected function execute(InputInterface $input, OutputInterface $output) {
+ protected function execute(InputInterface $input, OutputInterface $output): int {
$app = $input->getArgument('app');
$noSensitiveValues = !$input->getOption('private');
+ if (!is_string($app)) {
+ $output->writeln('<error>Invalid app value given</error>');
+ return 1;
+ }
+
switch ($app) {
case 'system':
$configs = [
@@ -102,6 +107,7 @@ class ListConfigs extends Base {
}
$this->writeArrayInOutputFormat($input, $output, $configs);
+ return 0;
}
/**