tracker issue : CF-3039414

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

Bug 79029:(Watson Migration Closure)Doing a StructCopy() on the arguments scope doesn't return a copy of the arguments scope - it simply returns the arguments scope

| View in Tracker

Status/Resolution/Reason: Closed/Won't Fix/LowImpact

Reporter/Name(from Bugbase): Mark Mandel / Mark Mandel (mark.mandel)

Created: 07/23/2009

Components: Language, Functions

Versions: 9.0

Failure Type: Unspecified

Found In Build/Fixed In Build: 0000 /

Priority/Frequency: Major / Most users will encounter

Locale/System: English / Platforms All

Vote Count: 3

Problem:

Doing a StructCopy() on the arguments scope doesn't return a copy of the arguments scope - it simply returns the arguments scope.This is very confusing, as changes to the returned struct from StructCopy() also occur on the arguments scope, as it is a reference.
Method:

<cffunction name="testArguments" hint="" access="public" returntype="numeric" output="true"><cfargument name="input" hint="" type="Numeric" required="Yes"><cfscript>var args = StructCopy(arguments);args.input++;        return arguments.input;    </cfscript></cffunction><cfoutput>Output should be 10. #testArguments(10)#</cfoutput>
Result:

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

Watson Bug ID:	3039414

External Customer Info:
External Company:  
External Customer Name: Mark Mandel
External Customer Email: 3EA9517D445A9E8999201549
External Test Config: 07/23/2009

Attachments:

Comments:

This bug has been voted..
Vote by External U.
23245 | November 10, 2011 06:59:46 PM GMT
Please fix this. This is a backwards compatability problem that breaks existing code.
Vote by External U.
23246 | November 10, 2011 06:59:46 PM GMT
This bug has been voted..
Vote by External U.
23247 | November 10, 2011 06:59:47 PM GMT