From 11b67c53b31f705489c5271bcd35f41259769f73 Mon Sep 17 00:00:00 2001 From: Benjamin Renard Date: Tue, 4 Jun 2024 11:45:40 +0200 Subject: [PATCH] Url::get_absolute_url(): fix checking if the public root URL is relative --- src/Url.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Url.php b/src/Url.php index 13557f5..e03a6d6 100644 --- a/src/Url.php +++ b/src/Url.php @@ -492,7 +492,7 @@ class Url { public static function get_absolute_url($relative_url=null) { if (!is_string($relative_url)) $relative_url = self :: get_current_url(); - if (self :: $public_root_url[0] == '/') { + if (self :: $public_root_url && self :: $public_root_url[0] == '/') { Log :: debug( "URL :: get_absolute_url($relative_url): configured public root URL is relative ". "(%s) => try to detect it from current request infos.",