Skip to content

modifier & logical operators in conditions #2655

@ghost

Description

Bug Description & How to Reproduce

The condition ...

{{ if {index|mod:4} == 0 or {index|mod:4} == 3 }}

... is always true, even if the index is 1 or 2, should only be true with index 0, 3, 4, 7 and so on. The modifier works as expected, if i output it directly. I tested this on the latest version.

Extra Detail

https://statamic.com/forum/4900-antlers-modifier-logical-operators-in-combination

Environment

Statamic version: 3.0.14
PHP version: 7.4
Install method (choose one): Fresh install from statamic/statamic

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions