Status/Resolution/Reason: Closed/Fixed/Fixed
Reporter/Name(from Bugbase): Ryan Cogswell / ()
Created: 10/05/2018
Components: Core Runtime
Versions: 2018
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: 3
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: