Sunday, May 20, 2018

CF-4202536 - local scope has THIS in .cfm

Issue: local scope has THIS in .cfm

Steps to Reproduce:
1) Enable NULL support
2) Run in a .cfm:

<cfscript>
  function f() {
  return local
  }
  writeDump(f())
</cfscript>

Actual Result (with NULL support enabled):

struct
ARGUMENTS
struct [empty]
THIS [null]

Expected Result (and actual result with NULL support disabled):

struct
ARGUMENTS
struct [empty]
Verified in build 2018.0.01.308605 (PreRelease).
Filed as CF-4202536.
Update: Issue also exists in threads:
<cfscript>
cfthread(name="myThread1"){variables.foo1 = duplicate(local)}
thread name="myThread2" {variables.foo2 = duplicate(local)}
cfthread(action="join", name="myThread1,myThread2")
writeOutput(foo1.keyExists("this"))
writeOutput(foo2.keyExists("this"))
</cfscript>

Actual Result: YESYES

Expected Result (and actual result when NULL support is disabled): NONO

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(...