tracker issue : CF-4198536

select a category, or use search below
(searches all categories and all time range)
Title:

IsNull() doesn't work on missing key of struct returned from function call

| View in Tracker

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:

Can someone explain what "bounced" means? Does that just mean it failed testing and needs additional development? Thanks!
Comment by Bradley W.
917 | September 05, 2017 05:24:57 PM GMT
That is correct, Brad. It is a fix that the QE team found was not working as expected, and hence marked it so.
Comment by Vamseekrishna N.
918 | September 06, 2017 03:17:36 AM GMT