tracker issue : CF-4203846

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

"1,0" and "0,1" are the same

| View in Tracker

Status/Resolution/Reason: To Fix//Investigate

Reporter/Name(from Bugbase): S C / ()

Created: 12/31/2018

Components: Language

Versions: 11.0

Failure Type: Incorrectly functioning

Found In Build/Fixed In Build: Update 15 /

Priority/Frequency: Normal / All users will encounter

Locale/System: ALL / Win 2008 Server R2 64 bit

Vote Count: 0

Problem Description: 
Hi,
there is a big issue when I compare two strings with "0,1" or "1,0" values. For instance if you code:

{code:java}
<cfif ToString("1,0") eq ToString("0,1")>
    <cfdump var="hello">
</cfif>
{code}


This problem occurs even with arrayFind() function. For example:

{code:java}
<cfset anArray = arrayNew(1)>
<cfset arrayAppend(anArray, "1,0")>

<cfif arrayFind(anArray, "0,1")>
    <cfdump var="hello">
</cfif>
{code}


I use ColdFusion11 update 15. I think this is an urgent fix.


Steps to Reproduce:
{code:java}
<cfif ToString("1,0") eq ToString("0,1")>
    <cfdump var="hello">
</cfif>
{code}
or
{code:java}
<cfset anArray = arrayNew(1)>
<cfset arrayAppend(anArray, "1,0")>

<cfif arrayFind(anArray, "0,1")>
    <cfdump var="hello">
</cfif>
{code}


Actual Result: actually CF11 treat "1,0" and "0,1" strings as equals

Expected Result: the strings should be considered not equals

Any Workarounds: if I write "1_0" and "0_1" instead of "1,0" and "0,1" it works.

Attachments:

Comments: