Warning: Illegal string offset 'CURRENCY_CODE' in Drupal\commerce_currency_switcher\Form\CurrencySwitchForm->buildForm() (line 82 of modules/contrib/commerce_currency_switcher/src/Form/CurrencySwitchForm.php).

The $currency_list variable should be an empty array instead of an empty string or else it breaks the switcher.

$currency_list = ''; on line 68 in CurrencySwitchForm.php should instead be $currency_list = [];

Maby I should commit a patch in the future ?

Hope this info helps someone trying to use this.
Thanks for the module, works great after this fix!

Comments

desiboli created an issue. See original summary.

sumanthkumarc’s picture

@desiboli, Yeah, you could provide a patch, so that i could give you commit credit for the issue :)

  • sumanthkumarc committed 93ad437 on 8.x-1.x
    Issue #2909761 by desiboli, sumanthkumarc: Warning: Illegal string...
sumanthkumarc’s picture

Status: Active » Fixed

Committed and thanks for reporting an issue. Appreciate it.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.