From b60d803f54ab9c4d0ac43b442ed6019d4ef33122 Mon Sep 17 00:00:00 2001 From: Sven Schultschik Date: Fri, 23 Feb 2024 18:27:25 +0100 Subject: [PATCH 1/2] fix cli scheduler:run breaks if --live-site does not end with / Signed-off-by: Sven Schultschik --- libraries/src/Uri/Uri.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libraries/src/Uri/Uri.php b/libraries/src/Uri/Uri.php index 0d4bd717969ca..84dca350a3db0 100644 --- a/libraries/src/Uri/Uri.php +++ b/libraries/src/Uri/Uri.php @@ -95,7 +95,11 @@ public static function getInstance($uri = 'SERVER') * * IIS uses the SCRIPT_NAME variable instead of a REQUEST_URI variable... thanks, MS */ - $theURI = 'http' . $https . $_SERVER['HTTP_HOST'] . $_SERVER['SCRIPT_NAME']; + $slash = ''; + if (substr($_SERVER['SCRIPT_NAME'], 0, 1) !== '/' && substr($_SERVER['HTTP_HOST'], -1) !== '/') { + $slash = '/'; + } + $theURI = 'http' . $https . $_SERVER['HTTP_HOST'] . $slash . $_SERVER['SCRIPT_NAME']; // If the query string exists append it to the URI string if (isset($_SERVER['QUERY_STRING']) && !empty($_SERVER['QUERY_STRING'])) { From 01c5fdaf01aed3e60fa6743aaa3b7074ac6db8f8 Mon Sep 17 00:00:00 2001 From: Sven Schultschik Date: Fri, 23 Feb 2024 18:37:15 +0100 Subject: [PATCH 2/2] update joomla-framework to include related PR Signed-off-by: Sven Schultschik --- composer.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/composer.lock b/composer.lock index 9e5728118cc52..be2ffa8dbed4b 100644 --- a/composer.lock +++ b/composer.lock @@ -994,12 +994,12 @@ "source": { "type": "git", "url": "https://github.com/joomla-framework/application.git", - "reference": "ab2481f02341ff10a418f10eaf0d28c1ae933c0e" + "reference": "c92b9db3745dafae6412879af57bcc3e8cb6b8ab" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/joomla-framework/application/zipball/ab2481f02341ff10a418f10eaf0d28c1ae933c0e", - "reference": "ab2481f02341ff10a418f10eaf0d28c1ae933c0e", + "url": "https://api.github.com/repos/joomla-framework/application/zipball/c92b9db3745dafae6412879af57bcc3e8cb6b8ab", + "reference": "c92b9db3745dafae6412879af57bcc3e8cb6b8ab", "shasum": "" }, "require": {