From 580025300c3cbf7cafe825bd454018ffc62233cf Mon Sep 17 00:00:00 2001 From: Ares Date: Thu, 13 Dec 2018 11:47:27 +0800 Subject: [PATCH] update url2absolute --- src/Toolkit.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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'];