tracker issue : CF-4203580

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

Breaking Change in boolean comparisons when one side is Null

| View in Tracker

Status/Resolution/Reason: Open//

Reporter/Name(from Bugbase): Mike Hodgson / ()

Created: 11/27/2018

Components: Core Runtime

Versions: 13.0

Failure Type: Incorrectly functioning

Found In Build/Fixed In Build: CF 2018 Update 1 /

Priority/Frequency: Normal / All users will encounter

Locale/System: English / Windows 7 SP1 64-bit

Vote Count: 1

Problem Description:

There appears to be a fundamental, breaking change in how null values are evaluated in a comparison. The comparisons below evaluated to False/NO in every version of Coldfusion before 2018. They now evaluate to True/YES.

Steps to Reproduce:

<cfoutput>#FunctionThatReturnsNull() gt now()#</cfoutput>
OR
<cfoutput>#FunctionThatReturnsNull() gt "hello"#</cfoutput>
Actual Result:
True
Expected Result:
False
Any Workarounds:
Change all code that makes these types of comparisons

Attachments:

Comments:

Attached screenshot of output from the attached script. Left side is CF 2016 output, and right side is CF 2018 output
Comment by Mike Hodgson
29973 | November 27, 2018 03:13:46 PM GMT