Potential crazy bug found? Strange situation: usi...
# lucee
p
Potential crazy bug found? Strange situation: using
cfsavecontent
to build a string list (don’t ask). When doing that, later using ListFind to locate an element in the list WILL NOT see the first element. It will see elements after the first and locate them properly. Demo code attached. This is running on Lucee 5.3.9.160. I’m seeing that the first express at the bottom equates to “0” (not found), while the second one does see the first element properly. Am I right here… if so, I’ll go ahead and submit a bug report?
Copy code
<cfsavecontent variable="textList">

<cfloop from="1" to="4" index="i"><cfoutput>#i#,</cfoutput></cfloop>

</cfsavecontent>

<cfset newTextList = "1,2,3,4,">

<cfdump var="#textList#">

<cfdump var="#newTextList#">


<cfoutput>#listFind(textList,"1")#</cfoutput>

<cfoutput>#listFind(newTextList,"1")#</cfoutput>
a
p
So it is! I kind of thought that might be the case, but couldn’t figure out how. The code DID work with ACF2016… it was only noticed when moving to Lucee. Thanks!
a
Possibly some sort of whitespace suppression settings on the server. I would always expect whitespace to bleed into that list, given how the code is