Skip to content

Commit 9b38338

Browse files
committed
fix: Ensure we only pass string to writeln()
Signed-off-by: Joas Schilling <[email protected]>
1 parent 6968906 commit 9b38338

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

apps/files_external/lib/Command/Config.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ protected function getOption(StorageConfig $mount, $key, OutputInterface $output
7373
if (!is_string($value) && json_decode(json_encode($value)) === $value) { // show bools and objects correctly
7474
$value = json_encode($value);
7575
}
76-
$output->writeln($value);
76+
$output->writeln((string) $value);
7777
}
7878

7979
/**

apps/files_external/lib/Command/Option.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@ protected function configure(): void {
3535
*/
3636
protected function getOption(StorageConfig $mount, $key, OutputInterface $output): void {
3737
$value = $mount->getMountOption($key);
38-
if (!is_string($value)) { // show bools and objects correctly
38+
if (!is_string($value) && json_decode(json_encode($value)) === $value) { // show bools and objects correctly
3939
$value = json_encode($value);
4040
}
41-
$output->writeln($value);
41+
$output->writeln((string) $value);
4242
}
4343

4444
/**

0 commit comments

Comments
 (0)