From 2e7f5d3891ab936f3dc6f79b38cf83b40ab182fb Mon Sep 17 00:00:00 2001 From: vibbow Date: Mon, 22 Apr 2019 14:43:42 +0800 Subject: [PATCH 1/2] Fix Debugbar url tail slash issue --- system/Debug/Toolbar/Views/toolbarloader.js.php | 2 +- system/Helpers/url_helper.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/system/Debug/Toolbar/Views/toolbarloader.js.php b/system/Debug/Toolbar/Views/toolbarloader.js.php index 0fe960f5e07e..539490bc57f0 100644 --- a/system/Debug/Toolbar/Views/toolbarloader.js.php +++ b/system/Debug/Toolbar/Views/toolbarloader.js.php @@ -56,7 +56,7 @@ function loadDoc(time) { } }; - xhttp.open("GET", url + "?debugbar_time=" + time, true); + xhttp.open("GET", url + "/?debugbar_time=" + time, true); xhttp.send(); } diff --git a/system/Helpers/url_helper.php b/system/Helpers/url_helper.php index 3c1d4a939d76..8e8561f9e883 100644 --- a/system/Helpers/url_helper.php +++ b/system/Helpers/url_helper.php @@ -76,7 +76,7 @@ function site_url($uri = '', string $protocol = null, \Config\App $altConfig = n } if (! empty($uri)) { - $fullPath .= '/' . $uri; + $fullPath .= $uri; } $url = new \CodeIgniter\HTTP\URI($fullPath); From fe8b70a25d513c04cd9381b117a3a2be2081f32e Mon Sep 17 00:00:00 2001 From: vibbow Date: Mon, 22 Apr 2019 15:28:53 +0800 Subject: [PATCH 2/2] withdraw the change to url_helper --- system/Helpers/url_helper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/Helpers/url_helper.php b/system/Helpers/url_helper.php index 8e8561f9e883..3c1d4a939d76 100644 --- a/system/Helpers/url_helper.php +++ b/system/Helpers/url_helper.php @@ -76,7 +76,7 @@ function site_url($uri = '', string $protocol = null, \Config\App $altConfig = n } if (! empty($uri)) { - $fullPath .= $uri; + $fullPath .= '/' . $uri; } $url = new \CodeIgniter\HTTP\URI($fullPath);