tracker issue : CF-3690488

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

cfdump does not show the value of an empty key

| View in Tracker

Status/Resolution/Reason: To Fix//

Reporter/Name(from Bugbase): Chris Hopkins / Chris Hopkins (Chris Hopkins)

Created: 01/08/2014

Components: Debugging, CFDump

Versions: 9.0.1

Failure Type: Unspecified

Found In Build/Fixed In Build: 9.0.1 /

Priority/Frequency: Trivial / Some users will encounter

Locale/System: English / Windows 7

Vote Count: 0

Problem Description:

Cfdump does not show the value of a struct key that is an empty string defined by "".

Steps to Reproduce:

<cfset a = {} />

<cfset a[""] = "its empty" />

<cfdump var="#a#" label="a" />

<cfdump var="#a['']#" />

Actual Result:
 
The dump of struct 'a' shows nothing for the key and value.

Expected Result:

The dump should show an empty key and "its empty" as the value.

Any Workarounds:

Dump key via array notation.

Also, I know an empty string is still a string and a technically valid key but it seems a bit odd to allow such a construct in the first place, and also odd that coldfusion shows nothing rather than the [empty string] that it shows sometimes when there is an empty string.

Note: I do not have a copy of 10 at hand to test.

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	3690488

External Customer Info:
External Company:  
External Customer Name: Chris_Hopkins
External Customer Email:  
External Test Config: My Hardware and Environment details:



CF 9.01 - Win 7 - IIS 7.5

Attachments:

Comments:

Just to note: this is fixed for in CF11 & 2016 but broke in 10 still
Comment by Chris H.
13728 | April 12, 2017 08:34:41 AM GMT