CRM-20858: Remove Try/Catch Blocks that Ignored Caught Exceptions
authorCamilo Rodriguez <camilo@compucorp.co.uk>
Mon, 21 Aug 2017 18:10:44 +0000 (18:10 +0000)
committerCamilo Rodriguez <camilo@compucorp.co.uk>
Mon, 21 Aug 2017 18:10:44 +0000 (18:10 +0000)
commit08b000992b37d28ec5bda903080a8991ae09dc46
tree945ef3ed03942d238474335863e1202405725484
parent0556db5dbd30f3d109a1685a6f78762bb9ecb9a4
CRM-20858: Remove Try/Catch Blocks that Ignored Caught Exceptions

The try catch blocks were apparently added because not all fields passed were
custom fields, generating exceptions when the API call was made to obtain its
option group. This happened because actually all fields selected for merge
were being inserted into the $submittedCustomFields array, instead of just
custom fields. Plus, obtaining the field's ID on a field that was not custom
rendered strange strings to be used on search of the field, as this ID is
obtained by getting a substring from the field's key, that should have the
format 'move_custom_<fieldid>' (fields that are not custom don't have that
format).
CRM/Dedupe/Merger.php