Title:
Bug 83654:Summary: CFCATCH struct seems to be put in the VARIABLES scope, not the VAR scopeConsider the code in the repro case
| View in TrackerStatus/Resolution/Reason: Closed/Fixed/
Reporter/Name(from Bugbase): Adam Cameron / Adam Cameron (Adam Cameron)
Created: 07/25/2010
Versions: 10.0
Failure Type: Unspecified
Found In Build/Fixed In Build: 0000 / 280065
Priority/Frequency: Normal / Unknown
Locale/System: English / Platforms All
Vote Count: 32
Problem:
Summary: CFCATCH struct seems to be put in the VARIABLES scope, not the VAR scopeConsider the code in the repro case.When I run this, the VARs dump has ARGUMENTS and THIS in it. The variables dump has the CFCATCH (and THIS and F()).However if I uncomment the <cfset var cfcatch = "">, I get an error on the <cfcatch> line because CFCATCH is already declared: Quote: Cannot declare local variable CFCATCH twice.But it doesn’t actually seem to BE a local variable. I know it should be (when was this fixed...? CFMX7?).This was running on CF8.0.1. If I run it on CF9 and change the VAR declaration to local.cfcatch, then I do get a CFCATCH variable in the local scope, but it’s not the one that <cfcatch> populates.What’s going on here?-- Adam
Method:
<!--- caller.cfm ---><cfset o = createObject("component", "CfCatchInScope")> <cfset o.f()><!--- CfCatchInScope.cfc ---><cfcomponent> <cffunction name="f"> <!---<cfset var cfcatch = "">---> <cftry> <cfset i = j><!--- errors ---> <cfcatch> <cfdump var="#getPageContext().getActiveFunctionLocalScope()#" label="VARs"> <cfdump var="#variables#" label="variables"> <cfabort> </cfcatch> </cftry> </cffunction></cfcomponent>
Result:
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3041807
External Customer Info:
External Company:
External Customer Name: Adam Cameron
External Customer Email: 17EB1A7649DA54C7992015A9
External Test Config: 07/25/2010
Attachments:
Comments: