History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: CFML-47
Type: Bug Bug
Status: Open Open
Priority: Normal Normal
Assignee: Valeria Nikolaenko
Reporter: Kenton
Votes: 1
Watchers: 2
Operations

If you were logged in you would be able to see more operations.
IntelliJ IDEA CFML Plugin

Smarter Scope Handling

Created: 29 May 09 21:49   Updated: 16 Jul 09 04:30
Component/s: None
Affects Version/s: None
Fix Version/s: None

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown


 Description  « Hide
A few issues here. One url, form, variables, arguments, request, application, server, and error should me considered variables available at all times.
<cfset test = structKeyExists(form, "blah")> <!--- form should be considered defined --->

Then a slightly more complicated issue. Coldfusion is friendly and automatically searches the scopes for variables (it goes in the order of variables, arguments, url, form and none of the other scopes are searched). While I consider it bad practice to not scope variables, coldfusion considers it valid. Here is an example of how this works

<cfset url.test = "1">
<cfset variables.test2 = "2">
<cfset form.test3 = "3">
<cfset request.test4 = "4">
<cfoutput>#test#</cfoutput>
<cfoutput>#test2#</cfoutput>
<cfoutput>#test3#</cfoutput>
<!---<cfoutput>#test4#</cfoutput> invalid! --->


 All   Comments   Work Log   Change History      Sort Order:
Daniel Jimenez - 29 May 09 23:24
I was just about to file this bug!

Kenton - 16 Jul 09 04:30
Also the same issue exists with true/false (I don't know if they should be considered variables or keywords.)