tracker issue : CF-3043881

select a category, or use search below
(searches all categories and all time range)
Title:

Bug 86961:From inside a CFC, calling GetMetaData(this)

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/

Reporter/Name(from Bugbase): Steve Onnis / Steve Onnis (Steve Onnis)

Created: 06/30/2011

Components: Language, CFSCRIPT

Versions: 10.0

Failure Type: Unspecified

Found In Build/Fixed In Build: 9,0,1,274733 / 279825

Priority/Frequency: Normal / Unknown

Locale/System: English / Win All

Vote Count: 4

Problem:

From inside a CFC, calling GetMetaData(this).properties returns an array but looping over the array using a for() loop results in an error
Method:

<cfcomponent>    <cfproperty name="foobar" type="string" />    <cffunction name="init">        <cfset LOCAL.properties = GetMetaData(this).properties />        <!--- This does not error --->        <cfloop array="#LOCAL.properties#" index="LOCAL.p"></cfloop>        <!--- This errors --->        <cfscript>            for (LOCAL.p in LOCAL.properties) {}        </cfscript></cffunction></cfcomponent>
Result:

You have attempted to dereference a scalar variable of type class [Ljava.lang.Object; as a structure with members

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	3043881

External Customer Info:
External Company:  
External Customer Name: Steve Onnis
External Customer Email: 6B4F6ECA439559160AAC0C16
External Test Config: 06/30/2011

Attachments:

Comments:

This bug has been voted..
Vote by External U.
21057 | November 11, 2011 07:32:45 AM GMT
Just to clarify that it's just" the new ( for x in y ) array loop syntax in 9.0.1 that fails. If you use the (var i=1; i LTE ArrayLen( y ); i++ ) syntax it works.
Vote by External U.
21058 | November 11, 2011 07:32:46 AM GMT
This bug has been voted..
Vote by External U.
21059 | November 11, 2011 07:32:47 AM GMT
This bug has been voted..
Vote by External U.
21060 | November 11, 2011 07:32:48 AM GMT