Title:
Bug 74612:Transfer ORM framework will not run on Centaur due to CFSCRIPT changes
| View in TrackerStatus/Resolution/Reason: Closed/Fixed/
Reporter/Name(from Bugbase): Sean Corfield / Sean Corfield (Sean Corfield)
Created: 12/19/2008
Components: Language, CFSCRIPT
Versions: 9.0
Failure Type: Unspecified
Found In Build/Fixed In Build: 0000 / 218121
Priority/Frequency: Major / Unknown
Locale/System: English / Platforms All
Vote Count: 0
Problem:
Transfer ORM framework will not run on Centaur due to CFSCRIPT changes.
The code contains a declaration:
var property = 0;
This raises an error on Centaur but works on CFMX7/CF8.
Method:
Try this code (taken from transfer/com/object/ObjectDAO.cfc):
<cffunction name="buildPropertyArrayMemento" hint="Builds the property part of the memento" access="private" returntype="void" output="false">
<cfargument name="objectname" hint="The name of the object" type="string" required="Yes">
<cfargument name="memento" hint="The memento to append the table to" type="struct" required="Yes">
<cfargument name="xObject" hint="The object xmlElem" type="xml" required="Yes">
<cfscript>
var len = 0;
var counter = 1;
var property = 0;
if(NOT StructKeyExists(arguments.xObject, "property"))
{
return;
}
len = ArrayLen(arguments.xObject.property);
for(; counter lte len; counter = counter + 1)
{
property = StructNew();
buildPropertyMemento(arguments.objectname, property, xObject.property[counter]);
arguments.memento.properties[counter] = property;
}
</cfscript>
</cffunction>
Result:
Error Occurred While Processing Request
function keyword is missing in function declaration.
The CFML compiler was processing:
A script statement beginning with var on line 8, column 17.
A cfscript tag beginning on line 5, column 10.
A cfscript tag beginning on line 5, column 10.
The error occurred in /Applications/ColdFusionCentaur/wwwroot/test/transfer.cfm: line 8
6 : var len = 0;
7 : var counter = 1;
8 : var property = 0;
9 :
10 : if(NOT StructKeyExists(arguments.xObject, "property"))
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3037108
External Customer Info:
External Company:
External Customer Name: Sean Corfield
External Customer Email: 479B4EDC43F3A88B992016B6
External Test Config: 12/19/2008
Attachments:
Comments: