projects
/
civicrm-core.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7d9f50a
)
CRM-14015 - Fix setvalue to work with required boolean fields
author
Coleman Watts
<coleman@civicrm.org>
Tue, 24 Dec 2013 05:06:09 +0000
(21:06 -0800)
committer
Coleman Watts
<coleman@civicrm.org>
Mon, 6 Jan 2014 19:10:41 +0000
(11:10 -0800)
api/v3/Generic/Setvalue.php
patch
|
blob
|
blame
|
history
diff --git
a/api/v3/Generic/Setvalue.php
b/api/v3/Generic/Setvalue.php
index 72cd6d41eb75d11dd522f3e1664d492cc14c401b..abe405a5eea6a30e53ea57771953e3ced2f0bde6 100644
(file)
--- 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));
}