Status/Resolution/Reason: Closed/Fixed/
Reporter/Name(from Bugbase): Stu Gray / Stu Gray (Stubotnik)
Created: 06/26/2012
Components: Language
Versions: 9.0.1
Failure Type: Non Functioning
Found In Build/Fixed In Build: 9.0.1 /
Priority/Frequency: Critical / All users will encounter
Locale/System: English / Windows 7
Vote Count: 0
Problem Description:
LOCAL scope variables are undefined when used inside an object literal which is declared in a function argument list. But only when used inside a loop.
Steps to Reproduce:
<cffunction name="f">
<cfoutput>
<cfset LOCAL.foo = 123 />
<cfloop from=1 to=1 index="i">
#serializeJSON({blah = LOCAL.foo})#
</cfloop>
</cfoutput>
</cffunction>
<cfset f() />
Actual Result:
Error: Element FOO is undefined in LOCAL
Expected Result:
No error.
Any Workarounds:
Replace loop above with this:
<cfloop from=1 to=1 index="i">
<cfset bar = {blah = LOCAL.foo} />
#serializeJSON(bar)#
</cfloop>
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3223465
External Customer Info:
External Company:
External Customer Name: Stubotnik
External Customer Email:
External Test Config: My Hardware and Environment details:
Server Product ColdFusion
Version 9,0,1,274733
Edition Enterprise
Operating System Windows 7
OS Version 6.1
Update Level /C:/ColdFusion9/lib/updates/hf901-00004.jar
Adobe Driver Version 4.0 (Build 0005)
JVM Details
Java Version 1.6.0_17
Attachments:
Comments: