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:
c3852f1
)
trim white space when checking dedupe
author
Pradeep Nayak
<pradpnayak@gmail.com>
Sat, 22 Aug 2020 13:06:48 +0000
(14:06 +0100)
committer
Pradeep Nayak
<pradpnayak@gmail.com>
Sat, 22 Aug 2020 13:06:48 +0000
(14:06 +0100)
CRM/Dedupe/BAO/Rule.php
patch
|
blob
|
blame
|
history
diff --git
a/CRM/Dedupe/BAO/Rule.php
b/CRM/Dedupe/BAO/Rule.php
index 0c40a52c58b61d03cf02092828c5e22065eeb1a5..b695d18b6e95f586d5962a949a698520874510a8 100644
(file)
--- a/
CRM/Dedupe/BAO/Rule.php
+++ b/
CRM/Dedupe/BAO/Rule.php
@@
-136,7
+136,7
@@
class CRM_Dedupe_BAO_Rule extends CRM_Dedupe_DAO_Rule {
$from = "{$this->rule_table} t1";
$str = 'NULL';
if (isset($this->params[$this->rule_table][$this->rule_field])) {
- $str =
CRM_Utils_Type::escape($this->params[$this->rule_table][$this->rule_field], 'String'
);
+ $str =
trim(CRM_Utils_Type::escape($this->params[$this->rule_table][$this->rule_field], 'String')
);
}
if ($this->rule_length) {
$where[] = "SUBSTR(t1.{$this->rule_field}, 1, {$this->rule_length}) = SUBSTR('$str', 1, {$this->rule_length})";