Yeah, you need to deal with the fact that "" is non-numeric.There's actually a bunch of different ways to do this though... have your cfargument with type="numeric" also have default="0", or pass in a 0 for that argument, or have type="any" or type="string" and do isNumeric(arguments.myNumber) before doing anything with it. Check for structKeyExists(arguments,"myNumber) before doing anything in your function.
There's a bazillion ways to make sure the argument is correct... just pick one and go with it. J On Jan 27, 2009, at 3:51 PM, Matt Quackenbush wrote: > If you pass an empty string to a type="numeric" argument, an > exception will be thrown because you're not passing a numeric > value. So, either don't pass an empty string and check for the > existence of the argument inside the function, or pass a 0. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CFCDev" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/cfcdev?hl=en -~----------~----~----~----~------~----~------~--~---
