tracker issue : CF-4196246

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

Comparing String Values with Zeros in the string

| View in Tracker

Status/Resolution/Reason: Closed/Withdrawn/Duplicate

Reporter/Name(from Bugbase): Matthew Parks / Matthew Parks (Matthew Parks)

Created: 10/13/2016

Components: Language

Versions: 11.0

Failure Type: Non Functioning

Found In Build/Fixed In Build: CF11_Final / Not fixed. Duplicate

Priority/Frequency: Critical / All users will encounter

Locale/System: English / Win 2012 Server x64

Vote Count: 0

Problem Description:

within an CFIF condition string "001" is returning that it is equal to "000001"

Steps to Reproduce:

<cfif "001" eq "000001">
EQUALS
<cfelse>
NOT EQUALS
</cfif>

Actual Result:
returns EQUALS

Expected Result:
retuns NOT EQUALS

Any Workarounds:

IDK

All of this can be somewhat simplified to this:

String compare is not working as expected with strings that could be converted to a number are not being treated as a string.

My reaction to that is:

This is a real problem.  We have this in a select HTML object to choose on option over another and the PK can be numbers where this situation has happened.

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	4196246

External Customer Info:
External Company:  
External Customer Name: Matthew Parks
External Customer Email:  
External Test Config: My Hardware and Environment details:



Windows CF 11 update 10

Attachments:

Comments: