Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[4.4] fix cli scheduler:run breaks if --live-site does not end with / #42864

Open
wants to merge 3 commits into
base: 4.4-dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion libraries/src/Uri/Uri.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'])) {
Expand Down