From d26bf9507fdd51f2d7dcde9e3b9bb367dba33777 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Molakvo=C3=A6=20=28skjnldsv=29?= Date: Wed, 11 Mar 2026 15:46:20 +0100 Subject: [PATCH] feat(core): cast valid booleans when setting system configs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: John Molakvoæ (skjnldsv) --- core/Command/Config/System/SetConfig.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/core/Command/Config/System/SetConfig.php b/core/Command/Config/System/SetConfig.php index 1b1bdc66a6e01..75169798be468 100644 --- a/core/Command/Config/System/SetConfig.php +++ b/core/Command/Config/System/SetConfig.php @@ -61,6 +61,14 @@ protected function execute(InputInterface $input, OutputInterface $output): int $configValue = $this->castHelper->castValue($input->getOption('value'), $input->getOption('type')); $updateOnly = $input->getOption('update-only'); + // If value is string false or true, cast them too + if (is_string($configValue['value'])) { + $lowerValue = strtolower($configValue['value']); + if ($lowerValue === 'false' || $lowerValue === 'true') { + $configValue = $this->castHelper->castValue($input->getOption('value'), 'boolean'); + } + } + if (count($configNames) > 1) { $existingValue = $this->systemConfig->getValue($configName);