BUGFIX Fixed breadcrumb exploding in DebugView when base-URL is "/" - was confusing the str_replace() logic

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@65517 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Ingo Schommer 2008-11-10 02:35:14 +00:00
parent 8fee0af63c
commit e562ac5477

View File

@ -51,7 +51,7 @@ class DebugView {
*/
public function Breadcrumbs() {
$basePath = str_replace(Director::protocolAndHost(), '', Director::absoluteBaseURL());
$relPath = parse_url(str_replace($basePath, '', $_SERVER['REQUEST_URI']), PHP_URL_PATH);
$relPath = parse_url(substr($_SERVER['REQUEST_URI'], strlen($basePath), strlen($_SERVER['REQUEST_URI'])), PHP_URL_PATH);
$parts = explode('/', $relPath);
$base = Director::absoluteBaseURL();
$pathPart = "";