Skip to content

Commit

Permalink
magento#16298 this sould fix the issue and fix a test fails on https:…
Browse files Browse the repository at this point in the history
  • Loading branch information
molneek committed Sep 8, 2018
1 parent 1a752a5 commit 0ee46f2
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ public function __construct(ScopeResolverPool $scopeResolverPool)
* Resolve scope code
*
* @param string $scopeType
* @param string $scopeCode
* @param null|string $scopeCode
* @return string
*/
public function resolve($scopeType, $scopeCode)
public function resolve($scopeType, $scopeCode = null)
{
if (isset($this->resolvedScopeCodes[$scopeType][$scopeCode])) {
return $this->resolvedScopeCodes[$scopeType][$scopeCode];
Expand All @@ -47,6 +47,9 @@ public function resolve($scopeType, $scopeCode)
) {
$scopeResolver = $this->scopeResolverPool->get($scopeType);
$resolverScopeCode = $scopeResolver->getScope($scopeCode);
if ($scopeCode === null) {
$scopeCode = $resolverScopeCode->getCode();
}
} else {
$resolverScopeCode = $scopeCode;
}
Expand All @@ -68,4 +71,4 @@ public function clean()
{
$this->resolvedScopeCodes = [];
}
}
}

0 comments on commit 0ee46f2

Please sign in to comment.