another structGet() incompatibility with ACF

Description

[Observed with 5.3.8.206 - unable to select this build in bug form]

(see LDEV-2046) I encountered a crash with Lucee while running some code which works on ACF, and while investigating I found - I extended the example from that issue to demonstrate the crash:

Lucee errors out on the last two StructGet() calls with the message like “invalid variable name declaration [animals.cat.activities.1]”

The first StructGet() call returns the expected results for both ACF and Lucee

The second StructGet() call also behaves as expected for both engines

The third StructGet() call is where the problem is - Lucee crashes because ‘animals.cat.activities.1’ is not a valid reference - but ACF returns an empty struct as expected.

The fourth call demonstrates that ACF (at least the 2018 release) also has a bug here - they return an empty struct (and corrupt the ‘animals’ struct by overwriting the value ‘lives’ with an empty struct). Clearly, this is an edge case, but it’s included for completeness.

relates to

Activity

Show:

Zac Spitzer 2 August 2022 at 06:26

Pothys - MitrahSoft 1 August 2022 at 11:15

I've checked this ticket with the lucee latest version 5.3.10.35-SNAPSHOT. I replicate the issue with the code mentioned above.
Yes, lucee has incompatibility with ACF. structGet("animals.cat.activities.1") throws error like invalid variable name declaration [animals.cat.activities.1]. Seems ACF returns an empty struct.

I added a testcase to this ticket
Pull Request:

Details

Assignee

Reporter

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

Priority

Created 29 July 2022 at 19:29
Updated 11 October 2022 at 11:45