mirror of
https://github.com/pelican-dev/panel.git
synced 2025-09-08 23:08:37 +02:00
also trim base
This commit is contained in:
parent
b6e991053d
commit
5b362208e1
@ -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);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user