From e746a64aaefc90105ad454188b849eaf3817086e Mon Sep 17 00:00:00 2001 From: "Robert J. Lang" Date: Tue, 18 May 2021 17:18:14 -0700 Subject: [PATCH] Separate checks for 0.0 and 0 --- api/v3/utils.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/v3/utils.php b/api/v3/utils.php index 5919fb592b..d96aae6785 100644 --- 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.0 && $params[$key] !== '0')) { + if (!array_key_exists($key, $params) || (empty($params[$key]) && $params[$key] !== 0.0 && $params[$key] !== 0 && $params[$key] !== '0')) { $unmatched[] = $key; } } -- 2.25.1