Title:
Error when trying to loop (cfloop) over an empty array that is created implicitly and passed to (as an argument) - returned from a function.
| View in TrackerStatus/Resolution/Reason: Closed/Fixed/
Reporter/Name(from Bugbase): Rajesh Brukol / Rajesh Brukol (TwR)
Created: 10/23/2014
Components: Core Runtime
Versions: 11.0
Failure Type: Crash
Found In Build/Fixed In Build: CF11_Final /
Priority/Frequency: Major / All users will encounter
Locale/System: English / Linux
Vote Count: 1
Problem Description:
There is an error when trying to loop (cfloop) over an empty array that is created implicitly and passed to (as an argument) - returned from a function.
Steps to Reproduce:
Try this code:
<cffunction name="foo">
<cfargument name="ar" >
<cfreturn arguments.ar>
</cffunction>
<cfloop array="#foo([])#" index="i">
<cfoutput>Array : #i# <br /></cfoutput>
</cfloop>
Actual Result:
error
Error type : coldfusion.runtime.CfErrorWrapper
Diagnostic : Variable ___IMPLICITARRYSTRUCTVAR3 is undefined.
Expected Result:
empty loop but no error
Any Workarounds:
change foo([]) to foo(ArrayNew(1))
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3842517
External Customer Info:
External Company:
External Customer Name: TwR
External Customer Email:
External Test Config: cf11
Attachments:
Comments: