From d9d4f85f6820e6db77bdab613cafbff088318dd4 Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Mon, 23 Dec 2013 21:06:09 -0800 Subject: [PATCH] CRM-14015 - Fix setvalue to work with required boolean fields --- api/v3/Generic/Setvalue.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/v3/Generic/Setvalue.php b/api/v3/Generic/Setvalue.php index 72cd6d41eb..abe405a5ee 100644 --- a/api/v3/Generic/Setvalue.php +++ b/api/v3/Generic/Setvalue.php @@ -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)); } -- 2.25.1