Title:
[ANeff] Bug for: coldfusion.sql.QueryColumn coersion broken for function argument
| View in TrackerStatus/Resolution/Reason: Closed/Withdrawn/AsDesigned
Reporter/Name(from Bugbase): Aaron Neff / ()
Created: 04/04/2018
Components: Language, Functions
Versions: 2016
Failure Type: Others
Found In Build/Fixed In Build: 2016.0.05.303689 /
Priority/Frequency: Normal /
Locale/System: / Platforms All
Vote Count: 0
Issue: When a coldfusion.sql.QueryColumn is passed into a function argument of type array, coersion is broken.
Repro:
{code:java}
<cfscript>
q = queryNew("id", "integer", [[1],[2]]);
function f(array myArg) {return [ARGUMENTS.myArg.getClass().getName(), ARGUMENTS.myArg];}
if(isArray(q["id"])) {
writeDump(f(q["id"]));//shorter and should work
//writeDump(f(q.valueArray("id")));//unnecessary workaround
//writeDump(f(arrayNew(1).append(q["id"], true)));//unnecessary workaround
}
</cfscript>
{code}
Actual result: [coldfusion.sql.QueryColumn, 1]
Expected result: [coldfusion.sql.QueryColumn, [1,2]]
See? Argument type is array. But myArg only received the 1st cell value. It should've received all the cell values.
Since the current behavior is broken (an array is expected, but not received), backward-compat shouldn't be respected.
Attachments:
Comments: