aboutsummaryrefslogtreecommitdiffstats
path: root/core/Command/Config
diff options
context:
space:
mode:
authorMaxence Lange <maxence@artificial-owl.com>2024-01-16 08:48:58 -0100
committerMaxence Lange <maxence@artificial-owl.com>2024-01-16 08:48:58 -0100
commita4da1e43b41c117382e0360358bf491f911a006b (patch)
treefabf54c649ca981cc24f169fd8c6e9d97027408d /core/Command/Config
parent58b31a9d24edd85c72e7248bab6fc340eac28751 (diff)
downloadnextcloud-server-a4da1e43b41c117382e0360358bf491f911a006b.tar.gz
nextcloud-server-a4da1e43b41c117382e0360358bf491f911a006b.zip
true, on, yes and 1 can be boolean
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
Diffstat (limited to 'core/Command/Config')
-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\'');