From 4ee3b96881d16514385a61ecc78b551b1450b2b2 Mon Sep 17 00:00:00 2001 From: Balazs Csaba Date: Tue, 10 Nov 2015 15:28:56 +0200 Subject: [PATCH] Fixed siteUrl trailing slash issue. --- languagelink/services/LanguageLinkService.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/languagelink/services/LanguageLinkService.php b/languagelink/services/LanguageLinkService.php index ca3e23e..a381699 100644 --- a/languagelink/services/LanguageLinkService.php +++ b/languagelink/services/LanguageLinkService.php @@ -80,6 +80,11 @@ private function _parseUrl($url, $localeCode) // Homepage doesn't need trailing slash if ($url != '') { + // make sure baseUrl has trailing slash + $baseUrl = rtrim($baseUrl, '/') . '/'; + // make sure url has no starting slash + $url = ltrim($url, '/'); + $url = $url.$trailing; }