tracker issue : CF-4203364

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

StructFind broken in CF 2018

| View in Tracker

Status/Resolution/Reason: To Fix//BugVerified

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 /

Priority/Frequency: Normal / Most users will encounter

Locale/System: / Windows 10 64 bit

Vote Count: 0

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:

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.