From ffd8dac1b4e95c05e7c0c27d66653576d0ffeb6e Mon Sep 17 00:00:00 2001 From: MrAn0nym <63542658+MrAn0nym@users.noreply.github.com> Date: Thu, 29 Jan 2026 14:29:15 +0100 Subject: [PATCH] Fix: Additional Collabora options not working correctly (#7481) Signed-off-by: MrAn0nym <63542658+MrAn0nym@users.noreply.github.com> Signed-off-by: Simon L. Co-authored-by: Simon L. Co-authored-by: Pablo Zmdl <57864086+pabzm@users.noreply.github.com> --- php/src/Docker/DockerActionManager.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/php/src/Docker/DockerActionManager.php b/php/src/Docker/DockerActionManager.php index 6fea395f..a8891c3c 100644 --- a/php/src/Docker/DockerActionManager.php +++ b/php/src/Docker/DockerActionManager.php @@ -420,7 +420,13 @@ readonly class DockerActionManager { // Additional Collabora options if ($this->configurationManager->collaboraAdditionalOptions !== '') { - $requestBody['Cmd'] = [$this->configurationManager->collaboraAdditionalOptions]; + // Split the list of Collabora options, which are stored as a string but must be assigned as an array. + // To avoid problems with whitespace or dashes in option arguments we use a regular expression + // that splits the string at every position where a whitespace is followed by '--o:'. + // The leading whitespace is removed in the split but the following characters are not. + // Example: "--o:example_config1='some thing' --o:example_config2=something-else" -> ["--o:example_config1='some thing'", "--o:example_config2=something-else"] + $regEx = '/\s+(?=--o:)/'; + $requestBody['Cmd'] = preg_split($regEx, rtrim($this->configurationManager->collaboraAdditionalOptions)); } }