Details
Assignee
UnassignedUnassignedReporter
Adam CameronAdam CameronPriority
MinorNew 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
Details
Details
Assignee
Unassigned
UnassignedReporter
Adam Cameron
Adam CameronPriority
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
Created 1 February 2015 at 16:01
Updated 7 July 2022 at 05:40
Copied from: https://issues.jboss.org/browse/RAILO-3151
NB: I'm not saying it's intrinsically a bug because it doesn't follow CF's lead; at the very least the difference needs to be documented.
Details here: http://cfmlblog.adamcameron.me/2014/08/what-was-that-arrayeach-quiz-all-about.html
Bottom line: this code behaves differently on Railo from how it does on CF:
a = ["a"]; a[3] = "c"; a.each(function(v,i,a){ writeOutput("value: #v?:'null'#<br>"); });
Railo iterates over the elements, CF iterates over the indexes.
CF's implementation came first, so - unless there's a conscious decision to vary behaviour - I'd say this is a compat bug in Railo.