From 0345e9d3f61e4f2e761cbcf68d5edb2bec1c163f Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 22 Mar 2022 16:18:22 +0300 Subject: [PATCH] rewrite_relative: use isset() to check for relative path --- classes/urlhelper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classes/urlhelper.php b/classes/urlhelper.php index 57046b600..8cd69abe4 100644 --- a/classes/urlhelper.php +++ b/classes/urlhelper.php @@ -110,7 +110,7 @@ class UrlHelper { $rel_parts['host'] = $base_parts['host'] ?? ""; $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 $base_path = with_trailing_slash(dirname($base_parts['path']));