Skip to content

Commit

Permalink
#30 Don't remove trailing slash from script paths
Browse files Browse the repository at this point in the history
  • Loading branch information
henkelund committed May 6, 2018
1 parent 1685ec0 commit 43a0a9c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Helper/Data.php
Expand Up @@ -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';
}

/**
Expand All @@ -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';
}

/**
Expand Down

0 comments on commit 43a0a9c

Please sign in to comment.