I have a couple of places that have some code like this:
<cfinvoke component="#application.path#cfc/eval_faculty" method="getPresentations" returnvariable="presentations">
<cfinvokeargument name="id" value="#eval_id#">
<cfinvokeargument name="evalYear" value="#eval_semester#">
<cfinvokeargument name="department" value="#general.dept#">
</cfinvoke>
<cfset prescheck = 0>
<cfloop query="presentations">
<cfif local eq "" and regional eq "" and national eq "" and international eq "">
<cfset prescheck = prescheck+1>
</cfif>
</cfloop>
I get this error:
Complex object types cannot be converted to simple values.
None of these values in the cfif statement is a complex object.
This worked fine in ColdFusion 8. We just upgraded to ColdFusion 9…
The error occurs on the line with <cfif local eq "" ... >
Any ideas?
It could be that
LOCALis now a system scope in CF9, likeFORM,URL, etecetera. So CF complains when you try to perform a string comparison on it because it is a structure. IfLOCALrepresents a simple variable in your old code, try using a different variable name.Update: From the comments, if
LOCALis the name of a column in your query, you could either use a sql alias to give it another name:… or use a fully qualified variable name: