From 090445e46f6bf5e0e0ff50b32bc7ce8cb7ccbf88 Mon Sep 17 00:00:00 2001 From: "backportbot[bot]" <63340225+backportbot[bot]@users.noreply.github.com> Date: Thu, 3 Oct 2024 14:53:56 +0300 Subject: [PATCH] [stable30] fix(command): Ensure that writeln() argument is string (#409) Backport of PR #408 Signed-off-by: Joas Schilling Co-authored-by: Joas Schilling --- lib/Command/ExAppConfig/GetConfig.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Command/ExAppConfig/GetConfig.php b/lib/Command/ExAppConfig/GetConfig.php index d0218270..cea540d4 100644 --- a/lib/Command/ExAppConfig/GetConfig.php +++ b/lib/Command/ExAppConfig/GetConfig.php @@ -49,7 +49,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int $defaultValue = $input->getOption('default-value'); if ($exAppConfig === null) { if (isset($defaultValue)) { - $output->writeln($defaultValue); + $output->writeln((string)$defaultValue); return 0; } $output->writeln(sprintf('ExApp %s config %s not found', $appId, $configKey)); @@ -58,7 +58,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int $value = $exAppConfig->getConfigvalue() ?? $defaultValue; - $output->writeln($value); + $output->writeln((string)$value); return 0; } }