Fix dev/core#2287 correctly check button to allow duplicate contact saving from profiles
authorColeman Watts <coleman@civicrm.org>
Wed, 6 Jan 2021 18:54:33 +0000 (13:54 -0500)
committerColeman Watts <coleman@civicrm.org>
Wed, 6 Jan 2021 20:11:22 +0000 (15:11 -0500)
CRM/Profile/Form.php

index c6594fd4bd97ae2c3ffcb3851f39836f608d1f9f..af6642111c689844ff4b05d0982295738654ccab 100644 (file)
@@ -994,7 +994,7 @@ class CRM_Profile_Form extends CRM_Core_Form {
     }
 
     // don't check for duplicates during registration validation: CRM-375
-    if (!$register && empty($fields['_qf_Edit_upload_duplicate'])) {
+    if (!$register && !array_key_exists('_qf_Edit_upload_duplicate', $fields)) {
       // fix for CRM-3240
       if (!empty($fields['email-Primary'])) {
         $fields['email'] = $fields['email-Primary'] ?? NULL;