• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

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

Guest
Nov 30, 2012 Nov 30, 2012

Copy link to clipboard

Copied

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 

Views

459

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 17, 2014 Sep 17, 2014

Copy link to clipboard

Copied

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....

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 18, 2014 Sep 18, 2014

Copy link to clipboard

Copied

LATEST

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation