aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorFerdinand Thiessen <opensource@fthiessen.de>2024-02-09 14:02:28 +0100
committerGitHub <noreply@github.com>2024-02-09 14:02:28 +0100
commitbe049ba6b312758947bae2cd31d6d32e9bfb98e4 (patch)
tree4e9de0534f3e3584adc346b6c298a7aad14b6029 /core
parent4154be65131389fb079678466fcc2e59678cf8b2 (diff)
parenta4da1e43b41c117382e0360358bf491f911a006b (diff)
downloadnextcloud-server-be049ba6b312758947bae2cd31d6d32e9bfb98e4.tar.gz
nextcloud-server-be049ba6b312758947bae2cd31d6d32e9bfb98e4.zip
Merge pull request #42833 from nextcloud/enh/noid/set-boolean-config
small improvement on occ app:config:set
Diffstat (limited to 'core')
-rw-r--r--core/Command/Config/App/SetConfig.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/Command/Config/App/SetConfig.php b/core/Command/Config/App/SetConfig.php
index aad31c85048..ae6f24e71d4 100644
--- a/core/Command/Config/App/SetConfig.php
+++ b/core/Command/Config/App/SetConfig.php
@@ -207,9 +207,9 @@ class SetConfig extends Base {
break;
case IAppConfig::VALUE_BOOL:
- if (strtolower($value) === 'true') {
+ if (in_array(strtolower($value), ['true', '1', 'on', 'yes'])) {
$valueBool = true;
- } elseif (strtolower($value) === 'false') {
+ } elseif (in_array(strtolower($value), ['false', '0', 'off', 'no'])) {
$valueBool = false;
} else {
throw new AppConfigIncorrectTypeException('Value is not a boolean, please use \'true\' or \'false\'');