Listfind & Listfindnocase works incorrectly while using includeEmptyFields=true

Description

List find & Listfindnocase incorrectly works for empty fields when includeemptyfields=true. If the list has empty fields in front of the list means lucee trim the empty fields and returns the wrong result. But ACF works fine in this scenario.

Lucee returns: 3

ACF returns: 1

Lucee returns: 3

ACF returns: 1

Environment

None

Activity

Show:
Zac Spitzer
February 20, 2020, 10:13 AM

includeemptyfields just means take them into account when returning the position?

I think we could improve the description, it's a bit confusing

https://docs.lucee.org/reference/functions/listfindnocase.html

Pothys - MitrahSoft
February 20, 2020, 10:44 AM

Yeah,

Pothys - MitrahSoft
February 20, 2020, 3:28 PM
Edited

I've added a test case and fix for this ticket.

Pull Request: https://github.com/lucee/Lucee/pull/863

Zac Spitzer
February 21, 2020, 8:22 AM

Can you add the attribute to the task title?

Assignee

Michael Offner

Reporter

Pothys - MitrahSoft

Priority

New

Labels

None

Fix versions

None

Affects versions

Configure