arrayEach/Reduce ignores elements with null values

Description

https://trycf.com/gist/d380b9acd1e41594034b0f9ad60cf7a2/lucee5?theme=monokai

CF:

undefined second third

Lucee:

second third

CF is correct. Lucee should do same.

Environment

None

Activity

Show:

Pothys - MitrahSoft 6 July 2022 at 06:10

I updated a test to arrayReduce() with the array that has null values in the above PR.

Pothys - MitrahSoft 9 June 2022 at 12:33

I've checked this ticket and confirmed the issue happened on the lucee latest version 5.3.10.10-SNAPSHOT. arrayEach() losses the null values in array. Seems ACF iterates the null values too.

I added a testcase to this ticket
Pull Request: https://github.com/lucee/Lucee/pull/1666

Details

Assignee

Reporter

Priority

New Issue warning screen

Before you create a new Issue, please post to the mailing list first https://dev.lucee.org

Once the issue has been verified, one of the Lucee team will ask you to file an issue

Sprint

Created 9 June 2022 at 10:10
Updated 6 March 2025 at 11:36