Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
C
Core
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 913
    • Issues 913
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Operations
    • Operations
    • Incidents
  • Analytics
    • Analytics
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
  • Development
  • Core
  • Issues
  • #1363

Closed
Open
Opened Nov 04, 2019 by JKingsnorth@JKingsnorth

Dedupe rule PHP notice for custom fields

When using custom fields in a dedupe rule a PHP notice can be thrown. This is because this line:

https://github.com/civicrm/civicrm-core/blob/3a5198897d7d4b5b3357d5e812fca66b58e88f82/CRM/Dedupe/BAO/Rule.php#L85

... passes in the table column name, to look up the type (eg: foo_bar_102), but the key in the fields list from getfields API call is the 'custom_' version (eg: custom_102).

This results in:

Notice: Undefined index: foo_bar_102 in CRM_Dedupe_BAO_Rule->sql() (line 85 of .../civicrm/CRM/Dedupe/BAO/Rule.php).

This doesn't normally have an impact because the 'else' clause kicks in instead, defaulting to a text string search. But it looks like it would break dedupe rules that have a date field type.

To upload designs, you'll need to enable LFS and have admin enable hashed storage. More information
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: dev/core#1363