Skip to content

Commit 582f194

Browse files
committed
CF2016 fix where the precedence of arguments results in the parent scope, not the child.
This caused the arguments structure referenced in _buildArgumentArray to have a StructCount of 1, containing the array of arguments, even if no arguments were passed. Simply renaming the variable to something that isn't a scope variable (args) fixes the issue.
1 parent b2aed1d commit 582f194

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

modules/cbjavaloader/models/javaloader/JavaProxy.cfc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,16 +121,16 @@ Mark Mandel 27/08/2007 Created
121121
</cffunction>
122122

123123
<cffunction name="_buildArgumentArray" hint="builds an argument array out of the arguments" access="private" returntype="array" output="false">
124-
<cfargument name="arguments" hint="the arguments passed through" type="struct" required="Yes">
124+
<cfargument name="args" hint="the arguments passed through" type="struct" required="Yes">
125125
<cfscript>
126-
var len = StructCount(arguments);
126+
var len = StructCount(args);
127127
var objArray = _getArray().newInstance(_getObjectClass(), len);
128128
var counter = 1;
129129
var obj = 0;
130130

131131
for(; counter <= len; counter++)
132132
{
133-
obj = arguments[counter];
133+
obj = args[counter];
134134
_getArray().set(objArray, counter - 1, obj);
135135
}
136136

0 commit comments

Comments
 (0)