Skip to content

Boolean filters are disabled by default #44

@twestner

Description

@twestner

In CheckboxViewHelper all checkboxes for boolean filters are disabled by default, due to a type mismatch.

In Line 110

!in_array((int)$objectId, $this->arguments['possibleFilters'][$propertyName], true)

is always true as (int)$objectId of 'true' or 'false' does never equal the string-array-values of 'true'/'false'.

Solution 1: remove (int)-cast and strict-comparison
CheckboxViewHelper.php L 110
!in_array($objectId, $this->arguments['possibleFilters'][$propertyName]))

Solution 2:
FilterService.php L173 ff
Initialising with 1 / 0 instead of 'true'/'false' also solves this problem.
But I am not sure, if there are side effects??

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions