Skip to content

fix: handle array-to-array comparison in filter matching #26

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 3 commits into
base: master
Choose a base branch
from

Conversation

frans-slabbekoorn
Copy link

No description provided.

@frans-slabbekoorn
Copy link
Author

I noticed the current filter logic doesn't handle comparing arrays properly.

Simple example: If you have ['tags' => ['red', 'blue']] as a filter and a record with the same tags array, it'll now match as expected. Before this fix, it would always return false since in_array() can't compare arrays.

@Sti3bas
Copy link
Owner

Sti3bas commented Apr 15, 2025

@frans-slabbekoorn thanks for the PR!

Could you add some tests?

@frans-slabbekoorn
Copy link
Author

@Sti3bas I have added the tests you requested, please let me know if you have feedback!

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.

2 participants