For whatever reason(right or wrong), we have a function declaration like:
<cffunction name="findaccount" access="public" returntype="struct">
<cfargument name="roles" type="numeric" required="true" default="1">
...
</cffunction>
Then the function is invoked by
<cfinvoke method="findaccount" returnvariable="stAccountDetails">
<cfinvokeargument name="roles" value="1,2">
</cfinvoke>
Regardless the original intention of passing a list to a function expecting numeric, this code has been working in CF9 for long time. Recently we decided to upgrade to CF11 and the code throws the following exception:
Detail: If the component name is specified as a type of this argument, it is possible that either a definition file for the component cannot be found or is not accessible.
Message: The ROLES argument passed to the findaccount function is not of type numeric.
When searching, I found a similar problem here. My question is: is taking the type check off the argument (like suggested by Adam Cameron) the best workaround for my case considering there are many invocations like this?
Nope, don't do what I said.
If you follow through the link to the bug I raised (mentioned in my answer), someone at Adobe clarified what is going on. It impacts the other situation and yours as well:
In CF 11 a new application setting was introduced: strictnumbervalidation = "true|false" By default the value of this setting is "true", which introduces strict number validation. Setting this value to "false" explicitly , will make the validation behave in old way.