Title:
Bug 80153:[JFERNANDES] CFThread within a loop inside cffunction breaks local scope
| View in TrackerStatus/Resolution/Reason: Closed/Fixed/
Reporter/Name(from Bugbase): João Fernandes / João Fernandes (Joao Fernandes)
Created: 09/23/2009
Components: Language
Versions: 9.0
Failure Type: Unspecified
Found In Build/Fixed In Build: 0000 / 256951
Priority/Frequency: Normal / Unknown
Locale/System: English / Platforms All
Vote Count: 0
Problem:
[JFERNANDES] CFThread within a loop inside cffunction breaks local scope.
Method:
Run the code with CFthread and then comment it and uncomment <cffile. cffile directly with local scope works, but when cfthread is present, it throws :Element SOURCE is undefined in LOCAL.<cfset exec()/><cffunction name="exec" access="public" returntype="void"><cfset var local ={}/><cfset local.storageDirectory = 'somestoragepath'/><cfset local.source = expandPath('/image/hello.jpg')/><cfset local.destination = expandPath('/image/goodbye.jpg')/><cfloop from="1" to="100" index="i"><cfthread name="t#i#" source="#local.source#" destination="#local.destination#"> <cffile action="copy" source="#attributes.source#" destination="#attributes.destination#"/></cfthread><!---<cffile action="copy" source="#local.source#" destination="#local.destination#"/>---></cfloop></cffunction>
Result:
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3040199
External Customer Info:
External Company:
External Customer Name: João Fernandes
External Customer Email: 4E9A42C244586146992015D5
External Test Config: 09/23/2009
Attachments:
Comments: