Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MISSING_VAR false positive cfquery loops #284

Closed
TheRealAgentK opened this issue Jun 7, 2017 · 2 comments
Closed

MISSING_VAR false positive cfquery loops #284

TheRealAgentK opened this issue Jun 7, 2017 · 2 comments
Assignees
Labels

Comments

@TheRealAgentK
Copy link
Collaborator

TheRealAgentK commented Jun 7, 2017

Column names from previous (correctly scoped/vared) queries inside of a query loop will be reported as incorrectly vared with the MISSING_VAR rule. In the example below, variables.siteDetailList[siteID] = ... will trigger it and report on siteID.

<cfquery name="something" datasource="#variables.DSN#">
      SELECT
      	..., siteID, ...
      FROM
        ...
</cfquery>

<cfloop query="something">
    <cfscript>
        variables.siteDetailList[siteID] = ...
    </cfscript>
</cfloop>
@ryaneberly
Copy link
Contributor

Good catch. Thanks @TheRealAgentK

@ryaneberly ryaneberly self-assigned this Jun 10, 2017
ryaneberly added a commit that referenced this issue Jun 16, 2017
ryaneberly added a commit that referenced this issue Jun 16, 2017
@TheRealAgentK
Copy link
Collaborator Author

Working fine now, thx!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants