Status/Resolution/Reason: Closed/Fixed/
Reporter/Name(from Bugbase): Bla Foo / Bla Foo (Bla Foo)
Created: 10/20/2015
Components: Language, Functions
Versions: 11.0
Failure Type:
Found In Build/Fixed In Build: CF11_Final /
Priority/Frequency: Major / Some users will encounter
Locale/System: German / Win 2012 Server x64
Vote Count: 0
Problem Description:
The function listToArray() with no delimiter ("") does not return the same array on JRE 1.7 and 1.8. At least since ColdFusion 8 (and JRE 1.6 I guess) the function listToArray() returned an array which has a length of arrayLen(text)+2, because it added an empty string to the beginning and ending of the array.
Steps to Reproduce:
<cfset arr = listToArray("abc", "", true)>
Actual Result:
The variable "arr" is an array with the following entries: ["a","b","c",""]
Expected Result:
The variable "arr" should be an array with the following entries: ["","a","b","c",""]
Or, but not preffered because it's not the same result like in older ColdFusion versions, this array: ["a","b","c"]
Any Workarounds:
<cfif arr[1] neq "">
<cfset arrayPrepend(arr, "")>
</cfif>
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 4076717
External Customer Info:
External Company:
External Customer Name: Bla Bla
External Customer Email:
External Test Config: My Hardware and Environment details:
ColdFusion Standard Edition 11 Update 6 with JRE 1.7.0_80 and 1.8.0_60
Attachments:
Comments: