> > <cfargument name="descriptlistArray" type="array" required="false"
> > default="">
>
> Why specify a default? If it isn't required, use
> 'isDefined()' inside the
> function.
>
> What's happening is that the call omits the argument so CF
> sets it to the
> default you specified, as if the user passed that value in,
> and then CF
> type checks it and fails: "" is not an array.
>
> Do this instead:
>
> <cfargument name="descriptlistArray" type="array"
> required="false"/>
> <cfif not isDefined("arguments.descriptlistArray")>
> <!--- handle omitted argument however you want,
> e.g.,: --->
> <cfset arguments.descriptlistArray = arrayNew(1)/>
> </cfif>
>
What is wrong with using the default? Yes, if you need more complex
initialization, you would use isDefined, but if you just want to init
the value to a blank array, the default is a valid way to do so.
=======================================================================
Raymond Camden, ColdFusion Jedi Master for Hire
Email : [EMAIL PROTECTED]
Yahoo IM : cfjedimaster
"My ally is the Force, and a powerful ally it is." - Yoda
______________________________________________________________________
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists