Status/Resolution/Reason: Closed/Withdrawn/AsDesigned
Reporter/Name(from Bugbase): Bradley Wood / Bradley Wood ()
Created: 04/03/2017
Components: Language
Versions: 2016
Failure Type: Incorrectly functioning
Found In Build/Fixed In Build: 10, 11, 2016 / 2018,0,0,303846
Priority/Frequency: Normal / Some users will encounter
Locale/System: ALL / Platforms All
Vote Count: 5
Problem Description:
isNull() throws an error when you pass it a non-existent key referenced from a struct inside an array.
Steps to Reproduce:
myArray = [];
myStruct = \{};
myArray[ 1 ] = myStruct;
writeOutput( isNull( myArray[1].value ) );
Actual Result:
This code works as expected on Lucee Server and returns "true". On ACF 10, 11, and 2016, it throws the error "Element VALUE is undefined in a CFML structure referenced as part of an expression."
Expected Result:
Should return the value "true".
Any Workarounds:
Use structKeyExists() or pull out the struct into an intermediate variable.
Attachments:
Comments: