Skip to content

Cover date custom fields in contact merges - #110

Merged
tellyworth merged 1 commit into
trunkfrom
fix/merge-date-custom-field
Nov 17, 2026
Merged

tellyworth merged 1 commit into
trunkfrom
fix/merge-date-custom-field

Conversation

@tellyworth

Copy link
Copy Markdown
Contributor

Fixes #28.

What

Merging contacts has copied a date custom field from the secondary record since #25 (6.8.6). The regression test for it was left out at the time because it tripped an unrelated deprecation, which fails the suite.

  • Adds that test: Contact_Merge_Date_Custom_Field_Test.
  • ZeroBSCRM.DAL3.ObjectLayer.php: the field length check casts the value to a string first. A contact created without social accounts has NULL in those columns, the merge hands them back as they are, and strlen( null ) is deprecated from PHP 8.1. This was the first option suggested in the issue.

Testing

The new test passes with the cast and reports the deprecation without it. Full suite passes locally (267 tests); composer cs clean.

🤖 Generated with Claude Code

…n the field length check

Merging contacts copies a date custom field from the secondary record since
#25. This adds the test for it. The merge passes unset social fields to the
length check as null, so that check now casts to a string first.

Fixes #28.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@tellyworth
tellyworth merged commit c4d80f6 into trunk Nov 17, 2026
4 checks passed
@tellyworth tellyworth added this to the 6.8.7 milestone Nov 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Merging contacts drops date custom fields from the secondary record

1 participant