From 5b362208e155c702a2291b4d474250d36fddd861 Mon Sep 17 00:00:00 2001 From: Boy132 Date: Fri, 5 Sep 2025 14:08:15 +0200 Subject: [PATCH] also trim base --- app/helpers.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/helpers.php b/app/helpers.php index 3fbbb2382..65db56820 100644 --- a/app/helpers.php +++ b/app/helpers.php @@ -52,6 +52,8 @@ if (!function_exists('convert_bytes_to_readable')) { if (!function_exists('join_paths')) { function join_paths(string $base, string ...$paths): string { + $base = trim($base, '/'); + $paths = array_map(fn (string $path) => trim($path, '/'), $paths); $paths = array_filter($paths, fn (string $path) => strlen($path) > 0);