Skip to content
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

BUGFIX: 5265 - Ignore null values in SearchTermMatcher #5266

Merged
merged 2 commits into from
Sep 26, 2024

Conversation

nezaniel
Copy link
Member

Resolves #5265

This will skip null values (evaluating them as not matching) in nested property structures.

Also improves the resulting error message by adding context.

Upgrade instructions

None

Review instructions

None

Checklist

  • Code follows the PSR-12 coding style
  • Tests have been created, run and adjusted as needed
  • The PR is created against the 9.0 branch
  • Reviewer - PR Title is brief but complete and starts with FEATURE|TASK|BUGFIX
  • Reviewer - The first section explains the change briefly for change-logs
  • Reviewer - Breaking Changes are marked with !!! and have upgrade-instructions

Also improve error message by adding context
return true;
}
}
return false;
}

return match (true) {
$value === null => false,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i dont actually understand why its null? The SerializedPropertyValue ensures that its never null?
But maybe its the stupid $subValue iteration of mine? Good catch. I was trying to be clever and fully accurate ^^

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep, it's definitively not the property value itself, it's a value within the property value, which is a complex VO collection in my case

Copy link
Member

@mhsdesign mhsdesign left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, added an unit test

@nezaniel nezaniel merged commit 333c4dd into 9.0 Sep 26, 2024
10 checks passed
@nezaniel nezaniel deleted the 5265-nullHandlingInSearchTermMatcher branch September 26, 2024 10:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: SearchTermMatcher throws exception on null values
3 participants