CFLint
CFLint copied to clipboard
Rule Suggestion: hash in cfloop array
<cfloop query="">
in older versions of ACF did not allow #
in the query
attribute. <cfloop array="...">
requires #
in the array
attribute as it expects a name of a variable. Otherwise an exception is thrown: Object of type class java.lang.String cannot be used as an array
.
Maybe someone can build a checker for that.
Thank you!
<cfoutput>#item#</cfoutput>
</cfloop>
<hr>
<cfloop query="y" >
<cfoutput>a#item1#</cfoutput>
</cfloop>
<hr>
<cfloop query="#y#" >
<cfoutput>a#item1#</cfoutput>
</cfloop>
In my issue I simply wrote Maybe someone can build a checker for that
. Maybe it didn't sound as friendly as it was intended.
Thanks for caring.