Dedupe rules don't work with custom fields
Overview
Dedupe rules don't work with custom fields in versions of CiviCRM 5.21 and greater.
Reproduction steps
- Create new rule with any custom field of contact
- Click to use rule
- In next step (Find and Merge Duplicate Contacts) click to continue
- Drupal show error: "The website encountered an unexpected error. Please try again later"
- Dedupe rule tested in webforms and show same error.
Current behaviour
- Error Log:
TypeError: Argument 1 passed to civicrm_api3() must be of the type string, null given, called in civicrm/CRM/Dedupe/BAO/Rule.php on line 62 in civicrm_api3() (line 84 of civicrm/api/api.php).
Environment information
Tested in dmaster and other versions with Drupal: 5.21.2 and 5.22.0
Comments
Error has been reported here: https://civicrm.stackexchange.com/questions/34228/issue-field-dedupe-0-argument-1-passed-to