Use IsDefined() Instead of ParameterExists()

The ParameterExists() function checks to see if a variable exists, so does IsDefined(). But IsDefined() is far more powerful and flexible, and should be used instead of the older ParameterExists() function. You can use IsDefined() anywhere you used ParameterExists(), but there is one important difference – IsDefined() needs quotes around the variable name (or it’ll check to see if the variable referred to by the variable exists, probably not what you wanted). (Applies to: ColdFusion 4 (or later))

Leave a Reply