Skip to content

Commit fa906ed

Browse files
authored
Merge pull request #2066 from magento-thunder/PR-bugfixes
Fixed issue: MAGETWO-86656: app:config:dump doesn't work if run this command twice
2 parents 7ce6ffb + 954a930 commit fa906ed

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

app/code/Magento/Config/Model/Config/Importer.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,10 @@ public function import(array $data)
129129

130130
// Invoke saving of new values.
131131
$this->saveProcessor->process($changedData);
132-
$this->flagManager->saveFlag(static::FLAG_CODE, $data);
133132
});
133+
134+
$this->scope->setCurrentScope($currentScope);
135+
$this->flagManager->saveFlag(static::FLAG_CODE, $data);
134136
} catch (\Exception $e) {
135137
throw new InvalidTransitionException(__('%1', $e->getMessage()), $e);
136138
} finally {

app/code/Magento/Config/Test/Unit/Model/Config/ImporterTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,9 @@ public function testImport()
156156
$this->scopeMock->expects($this->at(2))
157157
->method('setCurrentScope')
158158
->with('oldScope');
159+
$this->scopeMock->expects($this->at(3))
160+
->method('setCurrentScope')
161+
->with('oldScope');
159162
$this->flagManagerMock->expects($this->once())
160163
->method('saveFlag')
161164
->with(Importer::FLAG_CODE, $data);

0 commit comments

Comments
 (0)