quaint
quaint copied to clipboard
No condition is translated as 1=1 for OR
The visitor always translates a ConditionTree::NoCondition
as 1=1
, which leads to the unexpected outcome that for an OR
filter, the entire expression becomes truthy.
After a cursory inspection of the visitor, I believe a fix would require the visitor to have context about the parent, which it isn't designed to have at the moment (as far as I can tell).
Discussed with @pimeys that we should probably just rename NoCondition
to something more expressive, like TrueCondition
and FalseCondition
to avoid setting the wrong expectations.