From ca6230e4c6c193ba53e992ff31be565077e9ad78 Mon Sep 17 00:00:00 2001 From: "Simon L." Date: Wed, 28 Jan 2026 15:25:16 +0100 Subject: [PATCH] adjust some details Signed-off-by: Simon L. --- php/src/Docker/DockerActionManager.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/php/src/Docker/DockerActionManager.php b/php/src/Docker/DockerActionManager.php index e88e7dee..aec2ef74 100644 --- a/php/src/Docker/DockerActionManager.php +++ b/php/src/Docker/DockerActionManager.php @@ -419,8 +419,14 @@ readonly class DockerActionManager { } // Additional Collabora options - if ($this->configurationManager->GetAdditionalCollaboraOptions() !== '') { - $requestBody['Cmd'] = preg_split('/\s+(?=-)/', $this->configurationManager->collaboraAdditionalOptions); + if ($this->configurationManager->collaboraAdditionalOptions !== '') { + // The regex not not extremely readable, should be the most thorough though. + // \s is any whitespace + // + means one or more token + // (?=) defines a positive lookahead (requirement but won't remove that character + // - the required character after an space + $regEx = '/\s+(?=-)/'; + $requestBody['Cmd'] = preg_split($regEx, $this->configurationManager->collaboraAdditionalOptions); } }