Skip to main content
November 30, 2012
Question

CF10 is evaluating strings with comma's as complex types (Array), formerly they were just Strings

  • November 30, 2012
  • 2 replies
  • 494 views

Coldfusion 10's behaviour appears to have changed in the evaluation of strings with commas.

Example:

FORM.IDS = 123456, 654321, 789101  (Form Submission)

<cfset fieldname="IDS" />

<cfset test1 = FORM[fieldname] />

<cfset test2 = evalute("FORM.#fieldname#") />

In Coldfusion 9 the value of test1 and test2 is reported as "123456, 654321, 789101".

In Coldfusion 10 the value of test1 and test2 is reported as an array. "Array (3)".

Is this expected behaviour?  This is jacking up an application we are trying to upgrade and did not expect this one.  Any help will be much appreciated.

Cheers

Lee 

This topic has been closed for replies.

2 replies

BKBK
Community Expert
Community Expert
September 18, 2014

ldavis101 wrote:

Coldfusion 10's behaviour appears to have changed in the evaluation of strings with commas.

Example:

FORM.IDS = 123456, 654321, 789101  (Form Submission)

<cfset fieldname="IDS" />

<cfset test1 = FORM[fieldname] />

<cfset test2 = evaluate("FORM.#fieldname#") /> [BKBK: typo corrected]

In Coldfusion 9 the value of test1 and test2 is reported as "123456, 654321, 789101".

In Coldfusion 10 the value of test1 and test2 is reported as an array. "Array (3)".

Is this expected behaviour? 

No, that is unexpected. Please report it as a bug.

Participant
September 17, 2014

Was this ever figured out?!

I'm having the same issue and it's holding up the upgrade of a *major* application.

a cfargument of type string used to work fine, but now it's interpreting it as a complex value somewhere....