From 27dd87c769ff16d7912a839a2df01c6982b16a76 Mon Sep 17 00:00:00 2001 From: Jitendra Purohit Date: Mon, 20 Mar 2017 11:10:58 +0530 Subject: [PATCH] CRM-20216 - Dedupe rules should be prevented from being saved if Weight Threshold is null or zero --- CRM/Contact/Form/DedupeRules.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CRM/Contact/Form/DedupeRules.php b/CRM/Contact/Form/DedupeRules.php index a27a06b5c8..82e2faf15a 100644 --- a/CRM/Contact/Form/DedupeRules.php +++ b/CRM/Contact/Form/DedupeRules.php @@ -155,6 +155,9 @@ class CRM_Contact_Form_DedupeRules extends CRM_Admin_Form { break; } } + if (empty($fields['threshold'])) { + $errors['threshold'] = ts('Threshold weight cannot be empty or zero.'); + } if (!$fieldSelected) { $errors['_qf_default'] = ts('Please select at least one field.'); -- 2.25.1