tracker issue : CF-4203611

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

[ANeff] Bug for: isDefined("local.myNull") returns incorrectly when null support enabled

| View in Tracker

Status/Resolution/Reason: Open//

Reporter/Name(from Bugbase): Aaron Neff / ()

Created: 12/03/2018

Components: Language, Null Support

Versions: 13.0

Failure Type: Incorrectly functioning

Found In Build/Fixed In Build: 2018.0.0.310739 /

Priority/Frequency: Normal / Few users will encounter

Locale/System: / Windows 10 64 bit

Vote Count: 0

Issue: isDefined("local.myNull") returns incorrectly when null support enabled

Repro:

Application.cfc
-----------
component {THIS.name="myApp" THIS.enableNullSupport=true}

index.cfm
-----------
<cfscript>
  myNullA = null
  variables.myNullB = null
  writeOutput(isDefined("myNullA") & ' ' & isNull(myNullA) & '<br>')
  writeOutput(isDefined("myNullB") & ' ' & isNull(myNullB) & '<br>')
  writeOutput(isDefined("variables.myNullA") & ' ' & isNull(variables.myNullA) & '<br>')
  writeOutput(isDefined("variables.myNullB") & ' ' & isNull(variables.myNullB) & '<br>')
  function f1() {
    var myNullC = null
    local.myNullD = null
    writeOutput(isDefined("myNullC") & ' ' & isNull(myNullC) & '<br>')
    writeOutput(isDefined("myNullD") & ' ' & isNull(myNullD) & '<br>')
    writeOutput(isDefined("local.myNullC") & ' ' & isNull(local.myNullC) & '<br>')
    writeOutput(isDefined("local.myNullD") & ' ' & isNull(local.myNullD))
  }
  f1()
</cfscript>

Actual Result:
-----------
YES YES
YES YES
YES YES
YES YES
YES YES
YES YES
NO YES
NO YES
-----------

Expected Result:
-----------
YES YES
YES YES
YES YES
YES YES
YES YES
YES YES
YES YES
YES YES
-----------

Attachments:

Comments: