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:
c9d3530
)
Fix mandatory keys check fail for value of float 0.0
author
Robert J. Lang
<robert@langorigami.com>
Tue, 18 May 2021 22:26:41 +0000
(15:26 -0700)
committer
Robert J. Lang
<robert@langorigami.com>
Tue, 18 May 2021 22:26:41 +0000
(15:26 -0700)
api/v3/utils.php
patch
|
blob
|
blame
|
history
diff --git
a/api/v3/utils.php
b/api/v3/utils.php
index f67ada48905b3ddbb9e5f40b9a4d70e89d34a145..5919fb592b975c8d7f6693c4d2447915a8c4a212 100644
(file)
--- a/
api/v3/utils.php
+++ b/
api/v3/utils.php
@@
-89,7
+89,7
@@
function civicrm_api3_verify_mandatory($params, $daoName = NULL, $keys = [], $ve
else {
// Disallow empty values except for the number zero.
// TODO: create a utility for this since it's needed in many places.
- if (!array_key_exists($key, $params) || (empty($params[$key]) && $params[$key] !== 0 && $params[$key] !== '0')) {
+ if (!array_key_exists($key, $params) || (empty($params[$key]) && $params[$key] !== 0
.0
&& $params[$key] !== '0')) {
$unmatched[] = $key;
}
}