- Issue created by @daniel_j
- Status changed to Needs review
over 1 year ago 10:52pm 3 July 2023 - last update
over 1 year ago 49 pass
When a filter criterion is NULL, zero, or the empty string, FilterBuilder logs a warning for "Invalid condition." Let's say that we have a field on nodes called "field_archived", and we want to only return nodes that have a value of zero or NULL on this field. Because the FilterBuilder is validating the condition by checking for a non-falsey value, it will incorrectly flag this condition as invalid (even though the condition will still be applied).
field_archived
on a content-type. The checkbox should be backed by a value of '1'.Invalid condition field_archived = '0'
or Invalid condition field_archived = NULL
In FilterBuilder::buildFilters()
, do not check $condition->getValue()
for falsiness when validating the condition.
None.
None.
None.
None.
Needs review
2.0
Code