Skip to content

Commit 99c8d5d

Browse files
committed
MAGETWO-69854: Can't set allowed or default currencies using config:set command
1 parent 44bb950 commit 99c8d5d

File tree

2 files changed

+158
-248
lines changed

2 files changed

+158
-248
lines changed

app/code/Magento/Config/Model/Config/Backend/Currency/Allow.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ public function __construct(
5454
public function afterSave()
5555
{
5656
$exceptions = [];
57-
foreach ($this->_getAllowedCurrencies() as $currencyCode) {
57+
$allowedCurrencies = $this->_getAllowedCurrencies();
58+
foreach ($allowedCurrencies as $currencyCode) {
5859
if (!in_array($currencyCode, $this->_getInstalledCurrencies())) {
5960
$exceptions[] = __(
6061
'Selected allowed currency "%1" is not available in installed currencies.',
@@ -63,7 +64,7 @@ public function afterSave()
6364
}
6465
}
6566

66-
if (!in_array($this->_getCurrencyDefault(), $this->_getAllowedCurrencies())) {
67+
if (!in_array($this->_getCurrencyDefault(), $allowedCurrencies)) {
6768
$exceptions[] = __(
6869
'Default display currency "%1" is not available in allowed currencies.',
6970
$this->_localeCurrency->getCurrency($this->_getCurrencyDefault())->getName()

0 commit comments

Comments
 (0)