Status/Resolution/Reason: Closed/Withdrawn/AsDesigned
Reporter/Name(from Bugbase): James M. / ()
Created: 03/20/2020
Components: Language, Array Functions
Versions: 2016
Failure Type: Non Functioning
Found In Build/Fixed In Build: 2016,0,14,318307 /
Priority/Frequency: Normal / Unknown
Locale/System: English / Win 2012 Server x64
Vote Count: 0
Problem Description: CFML should function in both CFTag and CFscript mode.
Steps to Reproduce:
Try this using code on TryCF.com (I'd recommend using CFFiddle.org, but CF2016 is already being treated as EOL there.)
<cfset myArray = ["a1", "a2", "a3", "b4", "b5"]>
<cfset myFilter = arrayFilter(myArray, function(item) {
return item.find("a");
})>
<cfdump var="#myFilter#">
It works with ColdFusion 2018 (and all versions of Railo & Lucee), but not CF2016.
Actual Result:
invalid CFMLConstruct error
Expected Result:
The filtered array (without any error).
Any Workarounds:
Modify your CFML and use cfscript tags when using the function.
Attachments:
Comments: