Fix slash handling in URL class.

This commit is contained in:
Taylor Otwell 2011-06-16 07:34:08 -07:00
parent ac7a77ffeb
commit 5ad4943edd
1 changed files with 2 additions and 2 deletions

View File

@ -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, '/');
}
/**