From 43a0a9c60dd2fcb65e173f4a601f005d4e591c07 Mon Sep 17 00:00:00 2001 From: Henrik Hedelund Date: Sun, 6 May 2018 18:33:53 +0200 Subject: [PATCH] #30 Don't remove trailing slash from script paths --- Helper/Data.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Helper/Data.php b/Helper/Data.php index 29f87cb..6c30440 100644 --- a/Helper/Data.php +++ b/Helper/Data.php @@ -142,11 +142,11 @@ public function getCdnBaseUrl($store = null, $secure = null) */ public function getJsScriptPath($store = null) { - return trim($this->scopeConfig->getValue( + return ltrim(trim($this->scopeConfig->getValue( self::XML_PATH_JS_SCRIPT_PATH, \Magento\Store\Model\ScopeInterface::SCOPE_STORE, $store - ), ' /') ?: 'piwik.js'; + )), '/') ?: 'piwik.js'; } /** @@ -170,11 +170,11 @@ public function getJsScriptUrl($store = null, $secure = null) */ public function getPhpScriptPath($store = null) { - return trim($this->scopeConfig->getValue( + return ltrim(trim($this->scopeConfig->getValue( self::XML_PATH_PHP_SCRIPT_PATH, \Magento\Store\Model\ScopeInterface::SCOPE_STORE, $store - ), ' /') ?: 'piwik.php'; + )), '/') ?: 'piwik.php'; } /**