fix array and notice
authorDemeritCowboy <demeritcowboy@hotmail.com>
Wed, 10 Apr 2019 00:42:18 +0000 (20:42 -0400)
committereileen <emcnaughton@wikimedia.org>
Thu, 11 Apr 2019 23:25:52 +0000 (09:25 +1000)
CRM/Dedupe/BAO/Rule.php

index ed0cdb6bc0f441c53ee70f71a5b72bd9aa4f5bce..5bb117b688633ecda31e682b3aa53bd711114287 100644 (file)
@@ -109,8 +109,8 @@ class CRM_Dedupe_BAO_Rule extends CRM_Dedupe_DAO_Rule {
       case 'civicrm_address':
         $id = 'contact_id';
         $on[] = 't1.location_type_id = t2.location_type_id';
-        $innerJoinClauses[] = ['t1.location_type_id = t2.location_type_id'];
-        if ($this->params['civicrm_address']['location_type_id']) {
+        $innerJoinClauses[] = 't1.location_type_id = t2.location_type_id';
+        if (!empty($this->params['civicrm_address']['location_type_id'])) {
           $locTypeId = CRM_Utils_Type::escape($this->params['civicrm_address']['location_type_id'], 'Integer', FALSE);
           if ($locTypeId) {
             $where[] = "t1.location_type_id = $locTypeId";