civicrm/civicrm-core — pull request #3475 by eileenmcnaughton (2014-06-11 02:48:14+00:00)
Title: CRM-14822 add checkbox handling to api custom fields

This fixes several logged issues as well as ongoing customer & forum complaints to do with the api not handling checkboxes correctly - the new code is only called for custom fields of type CheckBox - no other flows are touched & all the possible formats for checkboxes (ie. the one that already worked & the api-consistent ones) are heavily tested in the new tests (as well as pre-existing ones)

if ($checkCheckBoxField && $fields['custom_' . $customFieldID]['html_type'] == 'CheckBox') {