Skip to content
Snippets Groups Projects
Unverified Commit 7112fafa authored by Jørn Åne's avatar Jørn Åne Committed by GitHub
Browse files

Replace trim with ltrim/rtrim in getProcessedURL

parent ba843ffa
No related branches found
No related tags found
No related merge requests found
......@@ -377,7 +377,7 @@ class Simple
$scheme = parse_url($url, PHP_URL_SCHEME);
$host = parse_url($url, PHP_URL_HOST) ? : Utils\HTTP::getSelfHost();
$port = parse_url($url, PHP_URL_PORT) ? : (
$scheme ? '' : trim(Utils\HTTP::getServerPort(), ':')
$scheme ? '' : ltrim(Utils\HTTP::getServerPort(), ':')
);
$scheme = $scheme ? : (Utils\HTTP::getServerHTTPS() ? 'https' : 'http');
$path = parse_url($url, PHP_URL_PATH) ? : '/';
......@@ -394,7 +394,7 @@ class Simple
return $scheme.'://'.$host.$port.$path.($query ? '?'.$query : '').($fragment ? '#'.$fragment : '');
}
$base = trim($this->app_config->getString(
$base = rtrim($this->app_config->getString(
'baseURL',
$scheme.'://'.$host.$port
), '/');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment