Custom filters ignored if more than one exists but not all used in a query. #574
Unanswered
forrestedw
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi. First off, amazing package. Thank you.
I have a stack of customer filters that look a bit like this:
All those filters look a bit like this:
If I then had a query like this
?filter[foo]=asdf
, I found that no filtering took place. If I commented out the other two filters, then this filter did work. It was the same for the other filters.I ended up seeing the the docs
->ignore(null)
and added this to each to make this:And now everything works as expected. Yay!
However, this 'broken' behaviour wasn't always the case. It introduced itself at some point of my project development in the last four weeks. Also, sure the
->ignore(null)
is the default behaviour that everyone wants? It can't be that most people use all the filters the create all of the time?I had the issue on my local and staging. Another dev in my team had the issue, a third didn't, so I'm not sure how to reproduce. The only thing I can think is that I updated to php 7.4 around that time the issue came in, but I have no idea why that would matter.
Just wanted to flag this here, and see if anyone else had experienced the same?
Beta Was this translation helpful? Give feedback.
All reactions