Skip to content

Commit 308ad52

Browse files
Sekiphpkiatng
andauthored
Fix fatal error - getRegionCollection() - issue OpenMage#713 (OpenMage#1644)
* Fix fatal error - getRegionCollection() - issue OpenMage#713 * Update app/code/core/Mage/Directory/Helper/Data.php Co-authored-by: Ng Kiat Siong <kiatsiong.ng@gmail.com> Co-authored-by: Ng Kiat Siong <kiatsiong.ng@gmail.com>
1 parent 76e8fe3 commit 308ad52

File tree

1 file changed

+3
-3
lines changed
  • app/code/core/Mage/Directory/Helper

1 file changed

+3
-3
lines changed

app/code/core/Mage/Directory/Helper/Data.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,14 +107,14 @@ public function __construct(array $args = array())
107107

108108
/**
109109
* Retrieve region collection
110-
*
110+
* @param string|array|null $countryFilter If string, accepts iso2_code; if array, accepts iso2_code[].
111111
* @return Mage_Directory_Model_Resource_Region_Collection
112112
*/
113-
public function getRegionCollection()
113+
public function getRegionCollection($countryFilter = null)
114114
{
115115
if (!$this->_regionCollection) {
116116
$this->_regionCollection = Mage::getModel('directory/region')->getResourceCollection()
117-
->addCountryFilter($this->getAddress()->getCountryId())
117+
->addCountryFilter($countryFilter)
118118
->load();
119119
}
120120
return $this->_regionCollection;

0 commit comments

Comments
 (0)