From ae91714b70190c312b678a204eeecf9f12407991 Mon Sep 17 00:00:00 2001 From: Saugat Pachhai Date: Fri, 23 Nov 2018 12:50:22 +0545 Subject: [PATCH] Fix #33630. Fix cannot set 0 as value for config through OCC command --- apps/files_external/lib/Command/Config.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/apps/files_external/lib/Command/Config.php b/apps/files_external/lib/Command/Config.php index a5303a6535ab..7c1ec4d6901f 100644 --- a/apps/files_external/lib/Command/Config.php +++ b/apps/files_external/lib/Command/Config.php @@ -72,10 +72,14 @@ protected function execute(InputInterface $input, OutputInterface $output) { } $value = $input->getArgument('value'); - if ($value) { + + if ($value === "0" || $value === "1") { $this->setOption($mount, $key, $value, $output); - } else { + } elseif ($value === null) { $this->getOption($mount, $key, $output); + } else { + $output->writeln('Invalid value "' . $value . '". Possible values are 0 or 1.'); + return 404; } }