rewrite_relative: use isset() to check for relative path

This commit is contained in:
Andrew Dolgov 2022-03-22 16:18:22 +03:00
parent ee54904274
commit 0345e9d3f6
1 changed files with 1 additions and 1 deletions

View File

@ -110,7 +110,7 @@ class UrlHelper {
$rel_parts['host'] = $base_parts['host'] ?? ""; $rel_parts['host'] = $base_parts['host'] ?? "";
$rel_parts['scheme'] = $base_parts['scheme'] ?? ""; $rel_parts['scheme'] = $base_parts['scheme'] ?? "";
if ($rel_parts['path'] ?? false) { if (isset($rel_parts['path'])) {
// we append dirname() of base path to relative URL path as per RFC 3986 section 5.2.2 // we append dirname() of base path to relative URL path as per RFC 3986 section 5.2.2
$base_path = with_trailing_slash(dirname($base_parts['path'])); $base_path = with_trailing_slash(dirname($base_parts['path']));