AdobeStock_455007340

Make Sure Those Variables Are Local

Within a User Defined Function (UDF) code may access variables in any scope as well as local variables (local to the function itself). Any temporary variables, counters, loop condition variables and any other variables used within a UDF should be defined at the top of the function using the VAR keyword. Failure to do so could result in overwriting variables in the VARIABLES scope inadvertently. (Applies to: ColdFusion 5 (or later))

Leave a Reply