mirror of
https://github.com/nextcloud/server.git
synced 2026-02-20 00:12:30 -05:00
Merge pull request #42833 from nextcloud/enh/noid/set-boolean-config
small improvement on occ app:config:set
This commit is contained in:
commit
be049ba6b3
1 changed files with 2 additions and 2 deletions
|
|
@ -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\'');
|
||||
|
|
|
|||
Loading…
Reference in a new issue