----------------------------------------
* CRM-8963: Batch update profile: states do not change with country
http://issues.civicrm.org/jira/browse/CRM-8963
static function fixAllStateSelects(&$form, $defaults, $batchFieldNames = false) {
$config = CRM_Core_Config::singleton();
-
- $map = is_array($batchFieldNames) ? $batchFieldNames : $config->stateCountryMap;
+
+ $map = null;
+ if (is_array($batchFieldNames)) {
+ $map = $batchFieldNames;
+ }
+ else if (!empty($config->stateCountryMap)) {
+ $map = $config->stateCountryMap;
+ }
if (!empty($map)) {
foreach ($map as $index => $match) {