-
-
Notifications
You must be signed in to change notification settings - Fork 596
Closed
Labels
Description
Bug Description
{{ if view:image|length > 5 && view:image|length < 9 }} is true when array variable has 10 items
How to Reproduce
---
image:
- https://placeimg.com/412/280/people/sepia
- https://placeimg.com/412/280/people/sepia
- https://placeimg.com/412/280/people/sepia
- https://placeimg.com/412/280/people/sepia
- https://placeimg.com/412/280/people/sepia
- https://placeimg.com/412/280/people/sepia
- https://placeimg.com/412/280/people/sepia
- https://placeimg.com/412/280/people/sepia
- https://placeimg.com/412/280/people/sepia
- https://placeimg.com/412/280/people/sepia
---
{{ if view:image|length > 5 && view:image|length < 9 }} // true --> should be false
{{ if view:image|length > 5 && 8 < 9 }} // true
{{ if 8 < 9 && view:image|length > 5 }} // true
Extra Detail
update: {{ if view:image|count > 5 && view:image|length < 9 }} // false
Environment
Statamic 3.1.11 Pro
Laravel 8.40.0
PHP 7.3.12
doublethreedigital/duplicator 1.3.1
Install method (choose one):
- Fresh install from
statamic/statamic
edalzell and lostika86