Status/Resolution/Reason: Closed/Fixed/Fixed
Reporter/Name(from Bugbase): / ext-user (Anit Kumar Panda)
Created: 08/29/2016
Components: Language
Versions: 2016
Failure Type: Non Functioning
Found In Build/Fixed In Build: 299076 / 303894
Priority/Frequency: Major / Few users will encounter
Locale/System: English / Linux All,Mac 10 All,Solaris All,Win XP All
Vote Count: 5
Problem: "Variable ___IMPLICITARRYSTRUCTVAR2 is undefined."
Method: Try the below code:-
<cfscript>
writeOutput("#server.coldfusion.productVersion#<br>");
st = {};
k = "key";
try {
st[k] = st[k] ?: {};
} catch (any e){
writeOutput("#e.message#<br>");
} finally {
writeDump(st);
}
try {
st[k] = st.keyExists(k) ? st[k] : {};
} catch (any e){
writeOutput("#e.message#<br>");
} finally {
writeDump(st);
}
</cfscript>
Result: "Variable ___IMPLICITARRYSTRUCTVAR2 is undefined."
Expected: It should work.
Workaround: It creates an array in 2016,0,01,298513, not a struct.
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 4184965
External Customer Info:
External Company:
External Customer Name:
External Customer Email:
Attachments:
Comments: