Skip to content

Commit 64c6ff7

Browse files
author
Oleksii Korshenko
committed
MAGETWO-67055: Empty resolvedScopeCodes when config cache is cleaned #9061
- Merge Pull Request #9061 from andreas-wickberg-vaimo/magento2:develop
2 parents 3cb0463 + d490126 commit 64c6ff7

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

lib/internal/Magento/Framework/App/Config.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ public function isSetFlag($path, $scope = ScopeConfigInterface::SCOPE_TYPE_DEFAU
9595

9696
/**
9797
* Invalidate cache by type
98+
* Clean scopeCodeResolver
9899
*
99100
* @return void
100101
*/
@@ -103,6 +104,7 @@ public function clean()
103104
foreach ($this->types as $type) {
104105
$type->clean();
105106
}
107+
$this->scopeCodeResolver->clean();
106108
}
107109

108110
/**

lib/internal/Magento/Framework/App/Config/ScopeCodeResolver.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,14 @@ public function resolve($scopeType, $scopeCode)
5858
$this->resolvedScopeCodes[$scopeType][$scopeCode] = $resolverScopeCode;
5959
return $resolverScopeCode;
6060
}
61+
62+
/**
63+
* Clean resolvedScopeCodes, store codes may have been renamed
64+
*
65+
* @return void
66+
*/
67+
public function clean()
68+
{
69+
$this->resolvedScopeCodes = [];
70+
}
6171
}

0 commit comments

Comments
 (0)