Closed deriknel closed 7 years ago
@deriknel thank you for your report. I was not able to reproduce this issue. Could you please provide more details?
Hi Olga,
[image: Inline image 2] When selecting a single value, the method $this->_getAllowedCurrencies() returns a string but is used in an in_array logical check in files: Allow.php and DefaultCurrency.php. This is on magento v2.1.3.
Kind Regards, Derik Nel. @: derik.nel@gmail.com
On Thu, Jan 12, 2017 at 2:13 PM, Olga Moyseyenko notifications@github.com wrote:
@deriknel https://github.com/deriknel thank you for your report. I was not able to reproduce this issue. Could you please provide more details?
- Full description for currencies setup: for base, default displayed and allowed currencies.
- What level of scope do you use?
- What Magento mode do you use?
- Was it clear install or upgrade from some other version?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/magento/magento2/issues/8076#issuecomment-272148568, or mute the thread https://github.com/notifications/unsubscribe-auth/ACITRIJjqM6XKoSa-4zoJwbmZHEH3ypWks5rRhjlgaJpZM4LeTLX .
Closing this issue. PR https://github.com/magento/magento2/pull/8077 was delivered to develop branch
Internal ticket to track issue progress: MAGETWO-65003
Preconditions
Steps to reproduce
Expected result
Actual result
This is because the $this->_getAllowedCurrencies() method returns a string for single values and not an array as expected. Typecasting that to an array would fix this:
if (!in_array($this->getValue(), (array)$this->_getAllowedCurrencies())) {
Or alternatively update the methods to always return arrays.