CFLint icon indicating copy to clipboard operation
CFLint copied to clipboard

cfloop execute startFunction method.

Open Vintic opened this issue 6 years ago • 0 comments

Hi, found that cfloop will execute startFunction method that can lead to errors for some rules. Example: Execute UNUSED_LOCAL_VARIABLE rule for:

<cfcomponent>
    <cffunction name="test" access="public" returnType="any" output="true">
        <cfset LOCAL.resultText="error">
        <cfset LOCAL.test="error">
        <cfloop query="arguments.qmetadata">
            <cfdump var="#test#">
        </cfloop>
    </cffunction>
</cfcomponent>

startFunction clear localVariables list variable

Vintic avatar Feb 24 '20 09:02 Vintic