From a4da1e43b41c117382e0360358bf491f911a006b Mon Sep 17 00:00:00 2001 From: Maxence Lange Date: Tue, 16 Jan 2024 08:48:58 -0100 Subject: true, on, yes and 1 can be boolean Signed-off-by: Maxence Lange --- core/Command/Config/App/SetConfig.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'core') 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\''); -- cgit v1.2.3