'clone' method missing for array objects

Description

(also… the ‘affects versions’ dropdown in the ‘create’ dialog needs to be updated)

The following code works in ACF and Lucee 5.4.6.9 and earlier:

foo = ArrayNew(1);
ArrayAppend(foo,"first");
bar = foo.clone();

Lucee 6 throws an error:

The function [clone] does not exist in the Array. Available functions are….

This is minor, since the obvious work-around is to use Duplicate instead, but this is a breaking change for some users.

Attachments

1

Activity

Show:

Pothys - MitrahSoft last month

, For this ticket (https://luceeserver.atlassian.net/issues/LDEV-5440), I have updated the test case for struct.clone(), and here is the PR: https://github.com/lucee/Lucee/pull/2528/files. Please review this

Da Li last month

Just tested it on Lucee 6.2.1.77-RC, the error was still there. So I’m opening a new ticket to get Struct covered.

Pothys - MitrahSoft 13 March 2025 at 14:59
Edited

I tested this ticket with Lucee version 6.2.1.63-SNAPSHOT. When I tried to run array.clone(), no issues were encountered, and it now works fine.

Michael Offner 7 March 2025 at 16:26

actually it was a regression in 6.2, could you give that version a try

Michael Offner 7 March 2025 at 15:21

that is easy to solve, but i don’t think this is a regression from Lucee 6.1 to 6.2

Fixed

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

Sprint

Fix versions

Affects versions

Priority

Created 27 February 2025 at 19:03
Updated last month
Resolved 13 March 2025 at 15:00