diff --git a/src/Toolkit.php b/src/Toolkit.php index 20b75da..d45be46 100644 --- a/src/Toolkit.php +++ b/src/Toolkit.php @@ -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'])) { @@ -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'];