From d57f32ca367230ca1e9c914d93d41e0d48a24408 Mon Sep 17 00:00:00 2001 From: Edsel <edsel.lopez@jmaconsulting.biz> Date: Mon, 21 Apr 2014 20:07:10 +0530 Subject: [PATCH] GEP-42 Added nan check for assessment score --- grantprograms.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/grantprograms.php b/grantprograms.php index 737e448..e366b2c 100644 --- a/grantprograms.php +++ b/grantprograms.php @@ -100,7 +100,10 @@ function grantprograms_civicrm_grantAssessment(&$params) { foreach($value as $fieldKey => $fieldValue) { if (in_array($fieldValue['table_name'], array('civicrm_value_full_board_review_22', 'civicrm_value_grant_committee_review_21', 'civicrm_value_tech_assistance_evaluation_20')) && CRM_Core_DAO::getFieldValue('CRM_Core_DAO_CustomField', $fieldValue['custom_field_id'], 'html_type') == 'Select') { - $assessmentAmount += $fieldValue['value']; + if (is_nan((float)$fieldValue['value']) === FALSE) { + $assessmentAmount += $fieldValue['value']; + CRM_Core_Error::debug( '$fieldValue', $fieldValue['value'] ); + } } } } -- GitLab