Title:
Bug 86496:Summary: CF creates spurious variable "___IMPLICITARRYSTRUCTVAR0"See steps to reproduce
| View in TrackerStatus/Resolution/Reason: Closed/Fixed/
Reporter/Name(from Bugbase): Adam Cameron / Adam Cameron (Adam Cameron)
Created: 02/26/2011
Components: Language, Datastructure
Versions: 10.0
Failure Type: Unspecified
Found In Build/Fixed In Build: 9,0,1,274733 / 279963
Priority/Frequency: Trivial / Most users will encounter
Locale/System: English / Win All
Vote Count: 5
Problem:
Summary: CF creates spurious variable "___IMPLICITARRYSTRUCTVAR0"See steps to reproduce. When one runs this code with ?BUNG=TRUE on the URL, one sees that CF creates this "___IMPLICITARRYSTRUCTVAR0" variable in the variables scope. This only happens in CFM files (not CFC files). However if a CFC method includes a CFM (less than ideal, I know, but there's a good reason we're doing this), then the variable is created in the CFCs VARIABLES scope. If this CFC is a singleton... this could have potential for collisions under load? Not sure. Anyway, if using structNew() doesn't need to create this variable; nor should {}. Equally, this is new to CF9, so if CF8 didn't need it, then you simply shouldn't be doing it. -- Adam
Method:
<cfif structKeyExists(URL, "bung") AND URL.bung> <cfset st = { foo = "bar" }><cfelse> <cfset st = structNew()> <cfset st.foo = "bar"></cfif><cfloop item="sKey" collection="#variables#">VARIABLES.<cfoutput>#sKey#</cfoutput> found. Value:<br /> <cfdump var="#variables[sKey]#" label="#sKey#"> <hr /></cfloop><cfdump var="#variables#" label="variables">
Result:
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3043459
External Customer Info:
External Company:
External Customer Name: Adam Cameron
External Customer Email: 17EB1A7649DA54C7992015A9
External Test Config: 02/26/2011
Attachments:
Comments: