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

var q and a variables so that it also occurs for cases when there is … #500

Merged
merged 1 commit into from Mar 27, 2018

Conversation

Projects
None yet
3 participants
@matthewjones
Contributor

matthewjones commented Mar 27, 2018

…a queryString. discovered during working through an issue on slack that q and a were not being var scoped when queryString argument was passed in.

@matthewjones

This comment has been minimized.

Contributor

matthewjones commented Mar 27, 2018

Adding a simple example that reproduces issue.

<cfscript>
q = queryNew( "col_a,col_b,col_c" );
queryAddRow(q,1);
querySetCell(q, "col_a", 1);
querySetCell(q, "col_b", "name one");
querySetCell(q, "col_c", true);
queryAddRow(q,1);
querySetCell(q, "col_a", 2);
querySetCell(q, "col_b", "name two");
querySetCell(q, "col_c", false);
</cfscript>

<cftry>
<ol>
    <cfoutput query="q">
        <li><a href="#buildURL( action="my.action", queryString="id=#q.col_a#" )#">#q.col_b# #yesNoFormat(q.col_c)#</a></li>
    </cfoutput>
</ol>

<cfcatch type="any">
    <cfdump var="#cfcatch#">
</cfcatch>
</cftry>
@cfvonner

This comment has been minimized.

Contributor

cfvonner commented Mar 27, 2018

Thanks for tackling that Matthew. That was a fun edge case to sort out!

@seancorfield seancorfield merged commit a5ddba2 into framework-one:develop Mar 27, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@seancorfield

This comment has been minimized.

Member

seancorfield commented Mar 27, 2018

Good catch! I'm shocked no one has run into that after all the years that's been in the code base!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment