tracker issue : CF-3316788

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

arrayFindAll() returns false positives

| View in Tracker

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: 0

Problem Description:
arrayContains() is supposed to be case sensitive, but when looking-up a struct, the look-up is case insensitive

Steps to Reproduce:
<cfset arrayToSearch = [{key="value"}]>
<cfset structToFind = {key="VALUE"}>

<cfdump var="#arrayToSearch#" label="arrayToSearch">
<cfdump var="#structToFind#" label="structToFind">

Was it found:
<cfdump var="#arrayFindAll(arrayToSearch, structToFind)#">

Actual Result:
The mismatched-case versions are found

Expected Result:
The mismatched-case versions should not be found

Any Workarounds:
Doesn't matter: it should work properly.

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

Watson Bug ID:	3316788

Deployment Phase:	Release Candidate

External Customer Info:
External Company:  
External Customer Name: Adam Cameron.
External Customer Email:  
External Test Config: My Hardware and Environment details:



Adam, I think you may be mistaken here. ArrayFindAll was introduced in CF10 as far as I can gather, and its second argument should be a callback truth-test function.
Comment by External U.
18385 | October 16, 2013 11:13:31 PM GMT
Belay my last -- a string as the 2nd argument is actually one intended use of this function, but it's totally undocumented. Well done, Adobe.
Comment by External U.
18386 | October 16, 2013 11:25:13 PM GMT