Status/Resolution/Reason: Needs Review//EnhancementRequired
Reporter/Name(from Bugbase): Aaron Neff / Aaron Neff (Aaron Neff)
Created: 04/10/2014
Components: Core Runtime
Versions: 11.0
Failure Type:
Found In Build/Fixed In Build: PublicBeta /
Priority/Frequency: Major / Some users will encounter
Locale/System: English / Win All
Vote Count: 3
implicit struct|array overrides short-circuiting
Steps to reproduce:
 
{code}
<cfscript>
 function bar(){
 writeDump(ARGUMENTS);
 abort; 
 }
 
if(structKeyExists(variables, "foo") and bar({something=variables.foo})){
	writeOutput("example 1");}//exception: Element FOO is undefined in VARIABLES.
	if(structKeyExists(variables, "foo") and bar([variables.foo])){
		writeOutput("example 2");
	}//exception: Element FOO is undefined in VARIABLES.
	if(structKeyExists(variables, "foo") and invoke("", "bar", {something=variables.foo})){
		writeOutput("example 3");
	}//exception: Element FOO is undefined in VARIABLES
	if(structKeyExists(variables, "foo") and invoke("", "bar", [variables.foo])){
		writeOutput("example 4");
	}//exception: Element FOO is undefined in VARIABLES
</cfscript>
{code}
 
bar() is never called (good) but the implicit struct and array are evaluated (bad)
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3740276
External Customer Info:
 External Company: 
 External Customer Name: itisdesign
 External Customer Email:
  Attachments:
Comments: