tracker issue : CF-4203364

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

StructFind broken in CF 2018

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/Fixed

Reporter/Name(from Bugbase): Ryan Cogswell / ()

Created: 10/05/2018

Components: Core Runtime

Versions: 13.0

Failure Type: Non Functioning

Found In Build/Fixed In Build: 2018,0,01,311402 / 2018.0.0.311644

Priority/Frequency: Normal / Most users will encounter

Locale/System: / Windows 10 64 bit

Vote Count: 2

Problem Description: StructFind was enhanced to allow a UDF as the second parameter. In the past, the second parameter was assumed to be a String and CF cast whatever you passed in to be a String. Now it enforces that the second parameter is either a UDFMethod or a String and anything else causes an error.

Steps to Reproduce: https://cffiddle.org/app/file?filepath=0a15c196-a4a2-4a83-8848-22ce8c7deea7/bf27ba42-d0d2-4ca0-ad5d-711310320676/393595eb-8506-4eec-ab6d-c5ac740db040.cfm

Actual Result: Works in 2016 by converting second parameter to String, throws an error in 2018

Expected Result: Should continue casting the second argument to a String if it is anything other than a UDFMethod.

Any Workarounds: Workaround is to explicitly call ".toString()" on the parameter when passing it in (as shown on line 6 of the cffiddle), but we will not upgrade to 2018 until this is fixed since we have no desire to add this ugliness into the 200 or so places where we use StructFind.

As a separate note, your "Version" choices for this form do not yet include "2018" so I was forced to choose "2016" instead.

Attachments:

Comments:

It is labeled as Fixed. But it does not say when it was fixed
Comment by James Mohler
29885 | October 31, 2018 04:00:08 PM GMT
James, It is not in a release yet. The current status is "To Test". Once Adobe's testers have verified it, the fix will get scheduled into a release or hot fix. I'm not affiliated with Adobe, but I have had communications with their team regarding this bug.
Comment by Ryan Cogswell
29886 | October 31, 2018 07:15:39 PM GMT
Hi James , We are currently testing the fix for this bug. The fix will be out in the next update of ColdFusion 2018. If you need the fix urgently , please contact [cfinstal@adobe.com.|mailto:cfinstal@adobe.com.]   Thanks, Suchika
Comment by Suchika Singh
29899 | November 05, 2018 06:12:24 AM GMT