From 5ad4943eddcb63906647b30cac5653e35571a150 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Thu, 16 Jun 2011 07:34:08 -0700 Subject: [PATCH] Fix slash handling in URL class. --- system/url.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/system/url.php b/system/url.php index 4f343800..afb5baf1 100644 --- a/system/url.php +++ b/system/url.php @@ -21,7 +21,7 @@ public static function to($url = '', $https = false) // ---------------------------------------------------- // Get the base URL and index page. // ---------------------------------------------------- - $base = Config::get('application.url').'/'.Config::get('application.index').'/'; + $base = Config::get('application.url').'/'.Config::get('application.index'); // ---------------------------------------------------- // Does the URL need an HTTPS protocol? @@ -31,7 +31,7 @@ public static function to($url = '', $https = false) $base = 'https://'.substr($base, 7); } - return $base.ltrim($url, '/'); + return rtrim($base, '/').'/'.ltrim($url, '/'); } /**