Merge pull request #14899 from eileenmcnaughton/format
[civicrm-core.git] / CRM / Contact / Import / Parser.php
index 827eeff9fa34ea4080df9dd4e6f0d456f02fbaf4..ba205617155379d71b906e0156e95b77768d923f 100644 (file)
@@ -107,7 +107,7 @@ abstract class CRM_Contact_Import_Parser extends CRM_Import_Parser {
    */
   public function run(
     $tableName,
-    &$mapper,
+    $mapper = [],
     $mode = self::MODE_PREVIEW,
     $contactType = self::CONTACT_INDIVIDUAL,
     $primaryKeyName = '_id',
@@ -819,10 +819,6 @@ abstract class CRM_Contact_Import_Parser extends CRM_Import_Parser {
       elseif ($key == 'is_deceased' && $val) {
         $params[$key] = CRM_Utils_String::strtoboolstr($val);
       }
-      elseif ($key == 'gender') {
-        //CRM-4360
-        $params[$key] = $this->checkGender($val);
-      }
     }
 
     //now format custom data.
@@ -1347,7 +1343,9 @@ abstract class CRM_Contact_Import_Parser extends CRM_Import_Parser {
    *   Input values
    * @param string $entity
    *  - address, email, phone
-   * @param int|NULL $contactID
+   * @param int|null $contactID
+   *
+   * @throws \CiviCRM_API3_Exception
    */
   protected function fillPrimary(&$params, $values, $entity, $contactID) {
     if ($values['location_type_id'] === 'Primary') {