Skip to content

fix comparing content for a "simple" field that already has an empty value #1621

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: 5.x
Choose a base branch
from

Conversation

i-just
Copy link
Contributor

@i-just i-just commented Apr 3, 2025

Description

If you’re importing into a feed with setEmptyValues turned on, compareContent set to true (default), you have an existing element with a field that’s already empty, and you’re importing an empty value into that field, the content comparison was incorrectly reporting that the content has changed.

This happened because the Hash::check will always return false if the key exists but the value is null, causing the content to never actually get compared.

(Hash::extract will return an empty array causing Hash::check to return false.)

Related issues

#1615

@i-just i-just requested a review from angrybrad as a code owner April 3, 2025 09:02
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.

1 participant