tracker issue : CF-4184641

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

[ANeff] Bug for: some list member functions return incorrectly inside headless functions

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/Fixed

Reporter/Name(from Bugbase): Aaron Neff / Aaron Neff (Aaron Neff)

Created: 08/27/2016

Components: Language, Member Functions

Versions: 2016

Failure Type:

Found In Build/Fixed In Build: CF2016_Update2 / 2018.0.0.306050

Priority/Frequency: Major / Some users will encounter

Locale/System: English / Win All

Vote Count: 0

some list member functions return incorrectly inside headless functions (Verified in CF11 and CF2016)

See repro cases and comments in attached 20160827_ListMemberInHeadless_success.cfm and 20160827_ListMemberInHeadless_fail.cfm.

PLEASE, do not -only- test/fix the examples I provided. B/c, I did not have time to test every combination/scenario for you. Please test all list member functions. Before marking this ticket as fixed, please list which headless and/or list member functions were fixed.

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	4184641

External Customer Info:
External Company:  
External Customer Name: Aaron Neff
External Customer Email:

Attachments:

  1. August 28, 2016 00:00:00: 1_20160827_ListMemberInHeadless.zip

Comments:

Hi Adobe, Just following-up on this ticket nearly a year later. Here are some more repro cases. All cases should return "1". <cfscript> myList = "foo|bar"; writeOutput(listLen(myList.listFirst("|")));//returns 1 (good) writeOutput(listLen(myList.listFirst("|"), "|"));//returns 0 (bad) writeOutput(listLen(myList.listFirst("|").toString(), "|"));//returns 1 (good) writeOutput("<br>"); myList = "foo,bar"; writeOutput(listLen(myList.listFirst()));//returns 1 (good) writeOutput(listLen(myList.listFirst(",")));//returns 0 (bad) writeOutput(listLen(myList.listFirst(",").toString()));//returns 1 (good) writeOutput(listLen(myList.listFirst(","), ","));//returns 0 (bad) writeOutput(listLen(myList.listFirst(",").toString(), ","));//returns 1 (good) writeOutput("<br>"); haystack = "foo|bar"; needles = "foo|bar"; needle = needles.listFirst("|"); writeOutput(listFind(haystack, needles.listFirst("|"), "|"));//returns 1 (good) writeOutput(listFind("foo|bar", needle, "|"));//returns 1 (good) writeOutput(listFind("foo|bar", needles.listFirst("|"), "|"));//returns 0 (bad) writeOutput(listFind("foo|bar", needles.listFirst("|").toString(), "|"));//returns 1 (good) writeOutput(listFind("foo|bar", listFirst(needles, "|"), "|"));//returns 1 (good) writeOutput("<br>"); haystack = "foo,bar"; needles = "foo,bar"; needle = needles.listFirst(","); writeOutput(listFind(haystack, needles.listFirst()));//returns 1 (good) writeOutput(listFind(haystack, needles.listFirst(",")));//returns 1 (good) writeOutput(listFind(haystack, needles.listFirst(","), ","));//returns 1 (good) writeOutput(listFind("foo,bar", needle));//returns 1 (good) writeOutput(listFind("foo,bar", needle, ","));//returns 1 (good) writeOutput(listFind("foo,bar", needles.listFirst(",")));//returns 0 (bad) writeOutput(listFind("foo,bar", needles.listFirst(",").toString()));//returns 1 (good) writeOutput(listFind("foo,bar", needles.listFirst(","), ","));//returns 0 (bad) writeOutput(listFind("foo,bar", needles.listFirst(",").toString(), ","));//returns 1 (good) </cfscript> Once fixed, please detail the fix. The issue seems to affect all list member functions, when nested within a headless function. BUT, the issue does not always occur (as you can see by the repro cases). And, when the issue occurs, it isn't always consistent. Confusing, I know :) So once the exact issue is identified, please share with us so we can check our code. Thanks!, -Aaron
Comment by Aaron N.
1944 | June 30, 2017 10:09:10 PM GMT
Hi Aaron, We have tried to cover all the list functions while testing the fix , the fix was quite generic and should work for all the list member functions. Let us know if it works for you ! This would be available soon in the next drop of the prerelease build. Thanks, Suchika
Comment by Suchika S.
1945 | February 01, 2018 07:58:22 AM GMT