From 0c094d12ad3048b2bca8a62658ab5af07ede9236 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Sun, 11 Aug 2013 22:34:05 -0700 Subject: [PATCH] CRM-13165 - api/v3/utils - Don't mandate that all "MONEY" fields be non-null ---------------------------------------- * CRM-13165: hrjob: Re-save produces blocking error, "X is not a valid amount" http://issues.civicrm.org/jira/browse/CRM-13165 --- 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 f8aeff580e..6a34ab8390 100644 --- a/api/v3/utils.php +++ b/api/v3/utils.php @@ -1093,7 +1093,7 @@ function _civicrm_api3_validate_fields($entity, $action, &$params, $errorMode = break; case CRM_Utils_Type::T_MONEY: - if (!CRM_Utils_Rule::money($params[$fieldName])) { + if (!CRM_Utils_Rule::money($params[$fieldName]) && !empty($params[$fieldName])) { throw new Exception($fieldName . " is not a valid amount: " . $params[$fieldName]); } } -- 2.25.1