tractorcow-farm / silverstripe-fluent

Multi-language translate module for Silverstripe, without having to manage separate site trees.
BSD 3-Clause "New" or "Revised" License
94 stars 111 forks source link

skip empty 'where' clauses #793

Closed mikey-harveycameron closed 1 year ago

mikey-harveycameron commented 1 year ago

This is a fix for both https://github.com/symbiote/silverstripe-gridfieldextensions/issues/356 and possibly https://github.com/tractorcow-farm/silverstripe-fluent/issues/257

tractorcow commented 1 year ago

Odd that that predicate was empty in the first place. We have suppressed the symptom; Is there worth looking into a deeper cause?

mikey-harveycameron commented 1 year ago

Hey uh, I appreciate the merge but I really needed it for SS4, not SS5... any chance it can be applied to your 6.0 branch too?

mikey-harveycameron commented 1 year ago

a quick debug shows that the $query->getWhere(); line is returning an empty condition at index 0. This suggests to me that the problem is outside this component.