[1.3.2] Modification of currency code generates error
Posted: Wed Aug 19, 2009 9:17 pm
First up Daniel, I want to say I realise this is _really_ obscure, but I came across it and thought you may be interested. I wasn't looking for it, found it when I was building the Paymate module and playing around with the fallback part.
In the catalog
Have the default currency selected (eg. GBP)
Open the Admin panel:
1. Admin -> Configuration -> Localisation -> Currency
2. Click 'Edit' on default currency
3. Modify the currency code eg. GBP -> GBX
4. Click 'Save'
Refresh your catalog page
Notice: Undefined index: GBP in <basedir>/system/helper/currency.php on line 53
Notice: Undefined index: GBP in <basedir>/system/helper/currency.php on line 54
Notice: Undefined index: GBP in <basedir>/system/helper/currency.php on line 55
Notice: Undefined index: GBP in <basedir>/system/helper/currency.php on line 63
That's about it.. I don't expect people to be changing their currency codes on live systems but I guess it's a bug.
A second part to this I noticed is that you can have 2 currencies with the same currency code, this should probably be checked in the save code of the currency because it makes for some interesting results.. eg. 2 concurrent default currencies.
Once again.. not sure how often people would actually do this.. but it may be hard to troubleshoot if they do! (and may potentially corrupt database entries)
In the catalog
Have the default currency selected (eg. GBP)
Open the Admin panel:
1. Admin -> Configuration -> Localisation -> Currency
2. Click 'Edit' on default currency
3. Modify the currency code eg. GBP -> GBX
4. Click 'Save'
Refresh your catalog page
Notice: Undefined index: GBP in <basedir>/system/helper/currency.php on line 53
Notice: Undefined index: GBP in <basedir>/system/helper/currency.php on line 54
Notice: Undefined index: GBP in <basedir>/system/helper/currency.php on line 55
Notice: Undefined index: GBP in <basedir>/system/helper/currency.php on line 63
That's about it.. I don't expect people to be changing their currency codes on live systems but I guess it's a bug.
A second part to this I noticed is that you can have 2 currencies with the same currency code, this should probably be checked in the save code of the currency because it makes for some interesting results.. eg. 2 concurrent default currencies.
Once again.. not sure how often people would actually do this.. but it may be hard to troubleshoot if they do! (and may potentially corrupt database entries)
