On 9/30/05, Barney Boisvert <[EMAIL PROTECTED]> wrote: > Can anyone confirm this bug on CF 7.0.1? > > <cffunction name="t"> > <cfargument name="a" type="numeric" required="true" /> > <cfreturn "_" & a & "_" /> > </cffunction> > <cfoutput> > #t(34)# > #t("34 ")# > </cfoutput> > > The second call to 't' should throw an error that the argument isn't > numeric, but it allows it. Even worse, the value of 'a' inside the > method isn't 34, but "34 " (note the trailing slash). I don't have a > 7.0.1 install, but I've confirmed this bug it on 6.1 and 7. >
Well your example doesn't have a trailing slash, it has a trailing space. It looks like what it's doing in that case in trim()-ing the value sent in to check its type. When I change your example above to: #t("34\")# it breaks as I would expect ("The argument A passed to function t() is not of type numeric."). There's no returntype on the function, so returning a string is fine. Did I miss something though? Regards, Dave. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:219777 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54