From: Joas Schilling Date: Wed, 2 Oct 2024 22:28:22 +0000 (+0200) Subject: fix: Ensure we only pass string to writeln() X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=4219969c96f8dcbe734b22faf1a1b92f35c16028;p=nextcloud-server.git fix: Ensure we only pass string to writeln() Signed-off-by: Joas Schilling --- diff --git a/apps/files_external/lib/Command/Config.php b/apps/files_external/lib/Command/Config.php index f677e51d604..0736749f6d9 100644 --- a/apps/files_external/lib/Command/Config.php +++ b/apps/files_external/lib/Command/Config.php @@ -73,7 +73,7 @@ class Config extends Base { if (!is_string($value) && json_decode(json_encode($value)) === $value) { // show bools and objects correctly $value = json_encode($value); } - $output->writeln($value); + $output->writeln((string)$value); } /** diff --git a/apps/files_external/lib/Command/Option.php b/apps/files_external/lib/Command/Option.php index 6b679f1d6f7..6051c9c5fbd 100644 --- a/apps/files_external/lib/Command/Option.php +++ b/apps/files_external/lib/Command/Option.php @@ -38,7 +38,7 @@ class Option extends Config { if (!is_string($value)) { // show bools and objects correctly $value = json_encode($value); } - $output->writeln($value); + $output->writeln((string)$value); } /**