Status/Resolution/Reason: Closed/Withdrawn/NotABug
Reporter/Name(from Bugbase): Adam Cameron / Adam Cameron (Adam Cameron)
Created: 08/23/2012
Components: Language, Closures
Versions: 10.0
Failure Type:
Found In Build/Fixed In Build: Final /
Priority/Frequency: Major / Some users will encounter
Locale/System: English / Win All
Vote Count: 1
Description
Problem Description:
arrayContains() is supposed to be case sensitive, but when looking-up a struct, the look-up is case insensitive
Steps to Reproduce:
<h1>Control</h1>
<p>This demonstrates that the function works with same-case</p>
<cfset arrayToSearch = [["value"]]>
<cfset arrayToFind = ["value"]>
<cfdump var="#arrayToSearch#" label="arrayToSearch">
<cfdump var="#arrayToFind#" label="arrayToFind">
Was it found:
<cfdump var="#arrayFindAllNoCase(arrayToSearch, arrayToFind)#">
<br />
<cfset arrayToSearch = [new Object("value")]>
<cfset objectToFind = new Object("value")>
<cfdump var="#arrayToSearch#" label="arrayToSearch">
<cfdump var="#objectToFind#" label="objectToFind">
Was it found:
<cfdump var="#arrayFindAllNoCase(arrayToSearch, objectToFind)#">
<br />
<hr />
<h1>Test</h1>
<p>This demonstrates that the function fails on different casing</p>
<cfset arrayToSearch = [["value"]]>
<cfset arrayToFind = ["VALUE"]>
<cfdump var="#arrayToSearch#" label="arrayToSearch">
<cfdump var="#arrayToFind#" label="arrayToFind">
Was it found:
<cfdump var="#arrayFindAllNoCase(arrayToSearch, arrayToFind)#">
<br />
<cfset arrayToSearch = [new Object("value")]>
<cfset objectToFind = new Object("VALUE")>
<cfdump var="#arrayToSearch#" label="arrayToSearch">
<cfdump var="#objectToFind#" label="objectToFind">
Was it found:
<cfdump var="#arrayFindAllNoCase(arrayToSearch, ObjectToFind)#">
<br />
Actual Result:
The mismatched-case versions are not found
Expected Result:
The mismatched-case versions should be found
Any Workarounds:
Doesn't matter: it should work properly.
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3316784
External Customer Info:
External Company:
External Customer Name: Adam Cameron.
External Customer Email:
External Test Config: My Hardware and Environment details:
Attachments:
Comments: