Add test for getting columns from header
[civicrm-core.git] / CRM / Contact / Import / Form / MapField.php
index 69f111bbc267181d89cece750396a27762ec1e4d..82aa20167d8ebafb74985101921850d40ca42252 100644 (file)
@@ -70,7 +70,7 @@ class CRM_Contact_Import_Form_MapField extends CRM_Import_Form_MapField {
   public function defaultFromColumnName($columnName, $patterns) {
 
     if (!preg_match('/^[a-z0-9 ]$/i', $columnName)) {
-      if ($columnKey = array_search($columnName, $this->_mapperFields)) {
+      if ($columnKey = array_search($columnName, $this->getFieldTitles())) {
         $this->_fieldUsed[$columnKey] = TRUE;
         return $columnKey;
       }