Skip to content

Commit

Permalink
update url2absolute
Browse files Browse the repository at this point in the history
  • Loading branch information
ares333 committed Dec 13, 2018
1 parent 17f4b5e commit 5800253
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Toolkit.php
Original file line number Diff line number Diff line change
Expand Up @@ -506,10 +506,10 @@ function url2dir($url)
* URLs, or FALSE if the base URL is not absolute or if either
* URL cannot be parsed.
*/
function url2absolute($baseUrl, $relativeUrl)
function url2absolute($url, $urlCurrent)
{
// If relative URL has a scheme, clean path and return.
$r = $this->splitUrl($relativeUrl);
$r = $this->splitUrl($url);
if ($r === FALSE)
return FALSE;
if (! empty($r['scheme'])) {
Expand All @@ -519,7 +519,7 @@ function url2absolute($baseUrl, $relativeUrl)
}

// Make sure the base URL is absolute.
$b = $this->splitUrl($baseUrl);
$b = $this->splitUrl($urlCurrent);
if ($b === FALSE || empty($b['scheme']) || empty($b['host']))
return FALSE;
$r['scheme'] = $b['scheme'];
Expand Down

0 comments on commit 5800253

Please sign in to comment.