Fix fatal when saving import mapping with a relationship but 'Primary' relationship...
authoreileen <emcnaughton@wikimedia.org>
Fri, 23 Aug 2019 03:24:37 +0000 (15:24 +1200)
committereileen <emcnaughton@wikimedia.org>
Fri, 23 Aug 2019 03:24:37 +0000 (15:24 +1200)
commitaf88ad4170095cf67a9b168046eeabf3a75aa143
tree36eae2578769eaabbc0515c1f684ce24b3d775d3
parent5c6fd6e2873a28bb27c12e7189a5c1fecbed5775
Fix fatal when saving import mapping with a relationship but 'Primary' relationship type

This occurs because the correct value to save for location_type_id of Primary is '' but the current code winds up casting to 0
which won't save as it there is a foreign key involved.  Handling was previously added but only to the
(duplicate) code that deals with non-relationship fields

https://github.com/eileenmcnaughton/civicrm-core/blob/cd41fa5b5599b329bd6f54acf0a79dda85477804/CRM/Contact/Import/Form/MapField.php#L724
CRM/Contact/Import/Form/MapField.php