Ticket #399 (closed defect: fixed)

Opened 16 years ago

Last modified 15 years ago

Space in CopyToScope() produces variables that are CF safe.

Reported by: lopezf@… Owned by:
Priority: normal Milestone: 3.1 Maintenance Final
Version: 3.1.185 Severity: normal
Keywords: copyToScope Cc:

Description

I found that this "<cfset event.copyToScope(variables, "xe.translationForm, translatedPhrase") /> " produces and error if you leave a space after the comma and before "translatedPhrase".The error is "Element TRANSLATEDPHRASE is undefined in VARIABLES."

Wouldn't make sense for readability purposes to allow for spaces but when parsing through the list apply a trim so the variables can be used without the space? After all CF doesn't allow for variable names with blank spaces right?

Change History

Changed 16 years ago by DanWilson

  • status changed from new to closed
  • resolution set to fixed

As of revision 273.

I just changed the behaviour of this method to trim the variables before they are set. Now we won't have to worry about this issue.

I also added the scope as the return of the function, so you can now do this:

<cfset scope = event.copyToScope( scope, "list,of,stuff" ) />

DW

Changed 16 years ago by boomfish

  • milestone changed from 3.2 to 3.1 Maintenance Final
Note: See TracTickets for help on using tickets.