Sunday, May 20, 2018

CF-4202535 - dump displays local scope as [undefined struct element]

Issue: dump displays local scope as [undefined struct element]

Steps to Reproduce:
1) Enable NULL support
2) Run:

<cfscript>
  function f() {
    myVar = NULL//if this isn't commented-out, r is displayed as [undefined struct element]
    return local
  }
  r = f()
  writeDump(variables)
</cfscript>

Actual Result:

struct
F
function f
Arguments: none
ReturnType: Any
Roles:  
Access: public
Output:  
DisplayName:  
Hint:  
Description:  
MYVAR [null]
R [undefined struct element]

Expected Result:

struct
F
function f
Arguments: none
ReturnType: Any
Roles:  
Access: public
Output:  
DisplayName:  
Hint:  
Description:  
MYVAR [null]
R
struct
ARGUMENTS
struct [empty]
Verified in build 2018.0.01.308605 (PreRelease).
Filed as CF-4202535.
Update: Another Repro:
<cfscript>
cfthread(name="myThread1"){variables.foo1 = duplicate(local)}
thread name="myThread2" {variables.foo2 = duplicate(local)}
cfthread(action="join", name="myThread1,myThread2")
writeDump([foo1,foo2])
writeDump({foo1=foo1,foo2=foo2})
</cfscript>

Actual Result: 1st dump's foo2 displayed as [undefined array element] and 2nd dump's foo2 displayed as [undefined struct element]

Expected Result: Both dump's foo2 properly displayed

No comments:

Post a Comment

ColdFusion member functions for XML object management

Prior to ColdFusion 2018, ColdFusion supported the following XML member functions : .elemNew() (equivalent of XmlElemNew ) .childPos(...