G'day
I'm running OBD 1.3.

Here's some test code:

<!--- caller.cfm --->
<cfset o = createObject("component", "Test1")>
<cfset stResult = o.f(arg1="foo", arg3="bar")>
<cfdump var="#stResult#">

<!--- Test1.cfc --->
<cfcomponent output="false">

        <cffunction name="f">
                <cfargument name="arg1" required="false">
                <cfargument name="arg2LeaveBlank" required="false">
                <cfargument name="arg3" required="false">

                <cfset var st = false>
                <cfinvoke method="g" returnvariable="st"
argumentcollection="#arguments#" />
                <cfreturn st>
        </cffunction>

        <cffunction name="g">
                <cfargument name="arg1" required="false">
                <cfargument name="arg2LeaveBlank" required="false">
                <cfargument name="arg3" required="false">
                <cfreturn arguments>
        </cffunction>

</cfcomponent>


Note that all that's going on is that I'm calling f() with an
"incomplete" set of arguments, and passing the arguments straight
through to g(), which simply returns them.  Nothing complicated or not
obvious.

However it doesn't work on OBD.  I get this error:

CFML Runtime Error
General Runtime Error
Request /misc/argcollectionbug/caller.cfm
File Trace      C:/webroots/openbd/misc/argcollectionbug/caller.cfm
|
+-- C:/webroots/openbd/misc/argcollectionbug/Test1.cfc

Type    Application
Function(s)     f (C:/webroots/openbd/misc/argcollectionbug/Test1.cfc,
Line=3, Column=2)
Detail  ARGUMENTCOLLECTION Struct contains invalid value

:-(

If one passes a value for the arg2LeaveBlank argument, there's -
predictably - no problem.

I don't *think* I'm missing something here... although it's Sunday and
anything's possible.  Certainly the code runs to expectations on
CF8.0.1.

Upon confirmation I'm not just being a div, I'll raise this as a bug.

Cheers.

--
Adam

-- 
Open BlueDragon Public Mailing List
 http://www.openbluedragon.org/   http://twitter.com/OpenBlueDragon
 online manual: http://www.openbluedragon.org/manual/

 mailing list - http://groups.google.com/group/openbd?hl=en

Reply via email to