This happens in all CF flavors as far as I know, and has (afaik) to do with the way the engine iterates through scopes to identify 'which' #userID# you're referring to, variables.userID, arguments.userID, etc.
Regardless, you don't need to redeclare an argument as a local variable, it is safe being referred to as arguments.userID within the function. On Wed, Jul 11, 2012 at 6:23 PM, Jason King <[email protected]> wrote: > Ok, thanks guys. I'm still trying to digest everything. > > I'm working on a script. > > Let's call it script.cfm > > At the begining of script.cfm, I declare the variable userID > > <cfset userID = "#fooNum#"> > > This is used for a few processes and eventually I call a UDF. One of > the arguments for the UDF is 'userID' > > <cfset dnsCreateResults = application.dnsCreate.dnsCreate( > userID="#userID#", > domain="#domain#", > > subFolder="#subFolder#", > > redirectURL="#redirectURL#", > unique="#unique#")> > > Within that UDF, I also declare userID > > <cfset var userID = "#arguments.userID#"> > > > When I run the script, it tells me I've declared userID twice. I > thought 'var' scoped variables were local and used only within that > function? > > -- > online documentation: http://openbd.org/manual/ > http://groups.google.com/group/openbd?hl=en > -- online documentation: http://openbd.org/manual/ http://groups.google.com/group/openbd?hl=en
