Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.10.6
-
Fix Version/s: 1.11.0
-
Component/s: Zend_Currency, Zend_Locale
-
Labels:None
Description
According to the documentation for Zend_Currency:
getCurrencyList(): Returns a list of all currencies which are used in the given region as array. Defaults to the objects locale when no region has been given.
Given this description, I would expect the code snippet "$oCurrency = new Zend_Currency(); $aAvailableCurrencies = $oCurrency->getCurrencyList();" to return a list of currencies used in the region specified by the user's browser. However, this code is instead returning the list of all currencies and the regions associated with each currency.
Looking at the Zend_Currency::getCurrencyList() method, either the line "Zend_Locale_Data::getList('', 'regiontocurrency', $region);" is not returning the expected data or additional processing must be done before returning a value.
You are missing one thing.
To which locale has Zend_Currency been set?
This information in not available by the snippet you gave.
It can be the users locale, the environment locale, a registry locale or a locale which is set within the bootstrap.
Additionally, when you've set only a language without a region this method is unable to return proper data because when no region is given, region specific informations can not be retrieved.
The main question which only you can answer is: Which region is requested by Zend_Currency within the subcall.