tracker issue : CF-4201097

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

NULL JSON data causes CFError during CFDump when specifying HIDE parameter

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/Fixed

Reporter/Name(from Bugbase): James Moberg / James Moberg ()

Created: 02/08/2018

Components: Debugging, CFDump

Versions: 2016,11.0,2018

Failure Type: Crash

Found In Build/Fixed In Build: 2016,0,05,303689 / 308382

Priority/Frequency: Normal / All users will encounter

Locale/System: ALL / Win 2012 Server x64

Vote Count: 0

Problem Description: When dumping an object deserialized from JSON that has a NULL value and attempting to specify a key to hide, an "Element [VARIABLENAME] is undefined in a CFML structure referenced as part of an expression" error is thrown.

The Lucee implementation of CFDump doesn't throw an error.  Here's a TryCF link:
https://trycf.com/gist/d691149ed2fc8e76b77f9677e6a81e87

Steps to Reproduce:
{code:java}
<CFSET testJSON = "{ ""id"": 123, ""orderID"": null}">
<CFSET TestStruct = DeserializeJSON(testJSON)>
<CFDUMP VAR="#TestStruct#" HIDE="id">
{code}

Actual Result:  Error.

Expected Result:  Not an error.  The actual dump result minus the keys identified in the "hide" parameter.

Any Workarounds: None.

Attachments:

Comments: