From f59c325b0536597e40508391daa66b01c96b4605 Mon Sep 17 00:00:00 2001 From: Clemens Schwaighofer Date: Thu, 7 Mar 2024 14:37:05 +0900 Subject: [PATCH] Bug fix in string path slash fix if null error return original path --- www/lib/CoreLibs/Convert/Strings.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/www/lib/CoreLibs/Convert/Strings.php b/www/lib/CoreLibs/Convert/Strings.php index 53d6bba7..2935e26d 100644 --- a/www/lib/CoreLibs/Convert/Strings.php +++ b/www/lib/CoreLibs/Convert/Strings.php @@ -124,7 +124,7 @@ class Strings * eg: //foo///bar/foo.inc -> /foo/bar/foo.inc * * @param string $path Path to strip slashes from - * @return string Clean path + * @return string Clean path, on error returns original path */ public static function stripMultiplePathSlashes(string $path): string { @@ -132,7 +132,7 @@ class Strings '#/+#', '/', $path - ); + ) ?? $path; } }