StructGet not Working Correctly for Scalar Variables in CF 9?
In ColdFusion 9, the following code snippet:
<cfset x = "5">
<cfset y = StructGet("x")>
<cfoutput>isStruct(y) = #isStruct(y)#<br></cfoutput>
<cfoutput>y = <br></cfoutput><cfdump var = "#y#"><cfoutput><br></cfoutput>
returns:
isStruct(y) = NO
y =
5
even though the CF documentation states that "if you accidentally use this function on a variable that is not a structure, it replaces the value with an empty structure" (see http://help.adobe.com/en_US/ColdFusion/9.0/Developing/WSc3ff6d0ea77859461172e0811cbec22c24-6210.html).
Under ColdFusion 8, the above code snippet does set up y as a structure.
Am I doing something wrong in the above code snippet, or is this a bug in ColdFusion 9?
