Title:
[ANeff] Bug for: some array searching functions are type-checking the haystack
| View in TrackerStatus/Resolution/Reason: To Test//Fixed
Reporter/Name(from Bugbase): Aaron Neff / ()
Created: 06/18/2018
Components: Language, Functions
Versions: 2018
Failure Type: Incorrectly functioning
Found In Build/Fixed In Build: 2018.0.0.310409 /
Priority/Frequency: Normal / Some users will encounter
Locale/System: / Platforms All
Vote Count: 0
Issue: some array searching functions are type-checking the haystack
Repro:
{code:java}
<cfscript>
haystack = [true,1,createDate(2018,1,1),"foobar",{foo="Bar"},function(){return true}]
arrayFind(haystack, "asdf")//no error (good)
arrayFindNoCase(haystack, "asdf")//throws '"Valid datatypes in array are String|Boolean|Number. "' (bad)
arrayFindAll(haystack, "asdf")//no error (good)
arrayFindAllNoCase(haystack, "asdf")//no error (good)
arrayContains(haystack, "asdf")//no error (good)
arrayContainsNoCase(haystack, "asdf")//throws '"Valid datatypes in array are String|Boolean|Number. "' (bad)
arrayDelete(haystack, "asdf")//no error (good)
arrayDeleteNoCase(haystack, "asdf")//throws '"Valid datatypes in array are String|Boolean|Number. "' (bad)
</cfscript>
{code}
Actual Result: The Array_(haystack, "needle") functions can find "needle" in any haystack, except for arrayFindNoCase(), arrayContainsNoCase() and arrayDeleteNoCase()
Expected Result: The Array_(haystack, "needle") functions can find "needle" in any haystack.
These functions must perform on any haystack. These are not typed-array-checking functions; that is the domain of isValid().
Attachments:
Comments: