diff --git a/src/Core/Path.php b/src/Core/Path.php index 8ca98f4c4..ac19475ba 100644 --- a/src/Core/Path.php +++ b/src/Core/Path.php @@ -30,7 +30,7 @@ class Path } // Cleanup and join all parts - $parts = array_filter(array_map('trim', $parts ?? [])); + $parts = array_filter(array_map('trim', array_filter($parts ?? []))); $fullPath = static::normalise(implode(DIRECTORY_SEPARATOR, $parts)); // Protect against directory traversal vulnerability (OTG-AUTHZ-001)