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: Closed/Fixed/Fixed

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

Created: 12/03/2018

Components: Language, Null Support

Versions: 2018

Failure Type: Incorrectly functioning

Found In Build/Fixed In Build: 2018.0.0.310739 / CF2018U5

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
 -----------
{code:java}
component{
THIS.name="myApp"
THIS.enableNullSupport=true
}
{code}
index.cfm
 -----------
{code:java}
<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>
{code}
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: