isdefined("cgi.anything") is always true.

use len(cgi.anything) instead.

On Tue, 24 Feb 2004 15:42:54 -0500, in cf-talk you wrote:

>All:
>
>I ran into something unusual and I've never heard of it before.  Through
>some quick testing, it seems as if trying to determine a variables existence
>within the CGI scope, whether using IsDefined() or StructKeyExists(), always
>returns YES.  Even if the variable doesn't exist in that scope.
>
>So, for example, the following evaluate to YES even if they shouldn't:
>
> IsDefined("CGI.foo")
> StructKeyExists(CGI, "foo")
>
>Doing a <CFDUMP VAR="#CGI#"> shows that the variable does not exist in the
>scope.
>
>As a work around, I'm using StructKeyList() to get a list of variables in
>the CGI scope, but it's a kludge I'd rather not use.
>
>Has anyone else ever run into this?  Know of a way to resolve it?
>
>TIA
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to