Fix obscure bug on updating custom fields (not necessarily hittable via UI)
authoreileen <emcnaughton@wikimedia.org>
Mon, 8 Jul 2019 22:41:20 +0000 (10:41 +1200)
committereileen <emcnaughton@wikimedia.org>
Mon, 8 Jul 2019 23:38:15 +0000 (11:38 +1200)
commitaa4143bb3ef0cf2fe13228942568dc6c458aa059
tree70054154b3fb71d288f008b88ed101a0115b3e66
parentdba70c02f8842c5db9723f53b13e068441176a81
Fix obscure bug on updating custom fields (not necessarily hittable via UI)

This fixes a bug which I think only applies to programatically created custom fields -basically if the field has an empty option_group_id
and then you update it to have one it does a check to see if the existing option_group_id is in use and does not handle the
fact the field is empty - leading to a mysql error.
CRM/Core/BAO/CustomField.php
tests/phpunit/api/v3/CustomFieldTest.php