Skip to content
Snippets Groups Projects
Commit d9d4f85f authored by colemanw's avatar colemanw
Browse files

CRM-14015 - Fix setvalue to work with required boolean fields

parent 7d9f50a2
No related branches found
No related tags found
No related merge requests found
......@@ -26,7 +26,7 @@ function civicrm_api3_generic_setValue($apiRequest) {
}
$def = $fields[$field];
if (array_key_exists('required', $def) && empty($value)) {
if (array_key_exists('required', $def) && CRM_Utils_System::isNull($value)) {
return civicrm_api3_create_error(ts("This can't be empty, please provide a value"), array("error_code" => "required", "field" => $field));
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment