tracker issue : CF-3041385

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

Bug 82768:I found two bugs with implicit struct notation

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/

Reporter/Name(from Bugbase): Raymond Camden / Raymond Camden (Raymond Camden)

Created: 04/28/2010

Components: Language, Tags

Versions: 9.0.1

Failure Type: Unspecified

Found In Build/Fixed In Build: 0000 / 274233,274253

Priority/Frequency: Normal / Unknown

Locale/System: English / Platforms All

Vote Count: 0

Problem:

I found two bugs with implicit struct notation. Consider this:<cfoutput query="art">calling foo with #artid# = #foo({id=art.artid[currentrow]})#<br/></cfoutput>This fails, with or w/o currentrow as the index (it should not be needed.)This version also fails:<cfoutput query="art"><cfset x = artid[currentrow]>calling foo with #artid# = #foo({id=x})#<br/> </cfoutput>
Method:

[vmannebo 4/30/10]

<cfquery name="art" datasource="cfartgallery">
	select * from art where artid = 1
</cfquery>

<cffunction name="foo">
	<cfargument name="art">
	<cfreturn art.id>
</cffunction>

<!--- Bug says: This fails, with or w/o currentrow as the index (it should not be needed.) --->
<!--- vmannebo: it works w/out currentrow but fails with current row --->
<cftry>
	<cfoutput query="art">
		calling foo with #artid# = #foo({id=art.artid[currentrow]})#<br/>
		<!--this works --->
		<!---
		<cfset data = foo({id=art.artid[currentrow]})>
		calling foo with #artid# = #data#<br/>		
		--->
	</cfoutput>
	<cfcatch type="any">
		<cfdump var="#cfcatch#">
	</cfcatch>
</cftry>

<!--- Bug says; it fails --->
<!--- vmannebo: it worked for me --->
<cftry>
	<cfloop query="art">
		<cfset x = artid[currentrow]>
		<cfoutput>calling foo with #artid# = #foo({id=x})#<br/></cfoutput> 
	</cfloop>
	<cfcatch type="any">
		<cfdump var="#cfcatch#">
	</cfcatch>
</cftry>
Result:

Normally a var not found type error.

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

Watson Bug ID:	3041385

Deployment Phase:	Release Candidate

External Customer Info:
External Company:  
External Customer Name: Raymond Camden
External Customer Email: 5FBC41E943BD265C992015D5
External Test Config: 04/28/2010

Attachments:

Comments: