Status/Resolution/Reason: Closed/Withdrawn/AsDesigned
Reporter/Name(from Bugbase): Bradley Wood / Bradley Wood ()
Created: 04/18/2017
Components: Language
Versions: 2016
Failure Type: Incorrect w/Workaround
Found In Build/Fixed In Build: 2016 /
Priority/Frequency: Normal / Some users will encounter
Locale/System: / Platforms All
Vote Count: 2
Problem Description:
IsNull() doesn't work on missing key of struct returned from function call
Steps to Reproduce:
http://trycf.com/gist/65954b72b4db39d4a5f35cfaa7a4312e/acf2016?theme=monokai
function brad() {
return {};
}
writeOutput( isNull( brad().foo ) );
Actual Result:
Element FOO is undefined in a CFML structure referenced as part of an expression.
Expected Result:
The value "true/yes".
Any Workarounds:
Use an intermediate variable
http://trycf.com/gist/7ea6a6ae6b998571df3c4a0ed8a78fc9/acf2016?theme=monokai
function brad() {
return {};
}
tempVariable = brad();
writeOutput( isNull( tempVariable.foo ) );
Attachments:
Comments: