CRM-17893: Cannot import custom field type Country
authoryashodha <yashodha.chaku@webaccessglobal.com>
Fri, 22 Apr 2016 06:24:12 +0000 (11:54 +0530)
committeryashodha <yashodha.chaku@webaccessglobal.com>
Fri, 22 Apr 2016 06:24:12 +0000 (11:54 +0530)
----------------------------------------
* CRM-17893: Cannot import custom field type Country
  https://issues.civicrm.org/jira/browse/CRM-17893

CRM/Core/BAO/CustomValueTable.php

index aecb546b1bbc7f7f98778bd8a9542ef5adbe52df..e71e106fffbba1c8ca6c6bbe776bc6d0914e61aa 100644 (file)
@@ -142,7 +142,7 @@ class CRM_Core_BAO_CustomValueTable {
                       CRM_Core_PseudoConstant::countryIsoCode(), TRUE
                     );
                   }
-                  $validCountries[] = CRM_Utils_Array::value('country_id', $states);
+                  $validCountries[] = CRM_Utils_Array::value('country_id', $countries);
                 }
                 $value = implode(CRM_Core_DAO::VALUE_SEPARATOR,
                   $validCountries