Status/Resolution/Reason: Closed/Withdrawn/DesignLimitation
Reporter/Name(from Bugbase): Fred Leefarr / Fred Leefarr ()
Created: 11/30/2017
Components: Language, Functions
Versions: 11.0
Failure Type: Non Functioning
Found In Build/Fixed In Build: dev /
Priority/Frequency: Normal / All users will encounter
Locale/System: UK English / Windows 10 64 bit
Vote Count: 1
Problem Description:
Elvis operator does not work as expected when using a variable for the array index
Steps to Reproduce:
?<cfscript>
function test() {
var arr = ["a", "b", "c"];
var index = 1;
var result = arr[index] ?: "undefined!";
WriteOutput(result);
}
test();
</cfscript>
Actual Result:
"undefined!"
Expected Result:
"a"
Any Workarounds:
Attachments:
Comments: