Skip to content

Commit eb45b37

Browse files
committed
Renamed variables named final for CF 2018 reserved word compatibility.
1 parent 837db96 commit eb45b37

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

org/cfstatic/core/StaticFile.cfc

+7-7
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
<cfargument name="includeConditionals" type="boolean" required="false" default="true" />
5050

5151
<cfscript>
52-
var final = ArrayNew(1);
52+
var finalArray = ArrayNew(1);
5353
var added = StructNew();
5454
var deep = "";
5555
var conditionals = "";
@@ -61,26 +61,26 @@
6161
deep = _dependencies[i].getDependencies( true );
6262
for( n=1; n LTE ArrayLen( deep ); n++ ){
6363
if ( not StructKeyExists( added, deep[n].getPath() ) ) {
64-
ArrayAppend( final, deep[n] );
64+
ArrayAppend( finalArray, deep[n] );
6565
added[ deep[n].getPath() ] = true;
6666
}
6767
}
6868
}
6969
if ( not StructKeyExists( added, _dependencies[i].getPath() ) ) {
70-
ArrayAppend( final, _dependencies[i] );
70+
ArrayAppend( finalArray, _dependencies[i] );
7171
added[ _dependencies[i].getPath() ] = true;
7272
}
7373
}
7474
if ( not includeConditionals ) {
7575
conditionals = ArrayToList( _getConditionalDependencies() );
76-
for( i=ArrayLen( final ); i GT 0 ; i-- ){
77-
if ( ListFindNoCase( conditionals, final[i].getPath() ) ) {
78-
ArrayDeleteAt( final, i );
76+
for( i=ArrayLen( finalArray ); i GT 0 ; i-- ){
77+
if ( ListFindNoCase( conditionals, finalArray[i].getPath() ) ) {
78+
ArrayDeleteAt( finalArray, i );
7979
}
8080
}
8181
}
8282

83-
return _bubbleSort( final );
83+
return _bubbleSort( finalArray );
8484
</cfscript>
8585
</cffunction>
8686

org/cfstatic/util/Base.cfc

+5-5
Original file line numberDiff line numberDiff line change
@@ -101,23 +101,23 @@
101101
<cfargument name="text" type="string" required="true" />
102102

103103
<cfscript>
104-
var final = StructNew();
104+
var finalStruct = StructNew();
105105
var pos = 1;
106106
var result = ReFindNoCase( regex, text, pos, true );
107107
var i = 0;
108108

109109
while( ArrayLen( result.pos ) GT 1 ) {
110110
for( i=2; i LTE ArrayLen( result.pos ); i++ ){
111-
if ( not StructKeyExists( final, '$#i-1#' ) ) {
112-
final[ '$#i-1#' ] = ArrayNew(1);
111+
if ( not StructKeyExists( finalStruct, '$#i-1#' ) ) {
112+
finalStruct[ '$#i-1#' ] = ArrayNew(1);
113113
}
114-
ArrayAppend( final[ '$#i-1#' ], Mid( text, result.pos[i], result.len[i] ) );
114+
ArrayAppend( finalStruct[ '$#i-1#' ], Mid( text, result.pos[i], result.len[i] ) );
115115
}
116116
pos = result.pos[2] + 1;
117117
result = ReFindNoCase( regex, text, pos, true );
118118
};
119119

120-
return final;
120+
return finalStruct;
121121
</cfscript>
122122
</cffunction>
123123

0 commit comments

Comments
 (0)