I thought I was going crazy for a minute but I've discovered an interesting bug with CFDUMP under ColdFusion9. Create two components, like so:

test.cfc <cfcomponent output="false" >

<cffunction name="test" returnType="array"> <cfreturn [1,2,3]> </cffunction>

<cffunction name="getTime" access="remote" returnType="any"> <cfreturn now()> </cffunction>


test2.cfc <cfcomponent>

<cffunction name="secondtest" returnType="array"> <cfreturn [1,2,3]> </cffunction>

<!--- <cffunction name="test" returnType="string"> <cfreturn "from test2"> </cffunction> --->


Notice that both CFCs have different methods. (I'll explain why test is commented out in a second.) Now put both CFCs in an structure (arrays also demonstrate this bug):

<cfset bucket = {}> <cfset bucket.test = createObject("component", "test")> <cfset bucket.test2 = createObject("component", "test2")>

<cfdump var="#bucket#">

The result is interesting - look at what is in test2 dump:

Yep - the methods from test.cfc "leaked" into the second one. If you use an array you see the same results. If you dump each component by itself, however, you do not see a problem. Also - if you uncomment the test method in the second component, the display for that particular method is correct. In other words, it shows the string return type of string, not array.

I've filed a bug report for this so hopefully it will get corrected in the next update.