Copy link to clipboard
Copied
Currently I am migrating from coldfusion 7 to coldfusion 2016.
When analyzing with the code analyzer of coldfusion2016, Parse Erro comes out in this line
<cfoutput>#writeLog("DS001", "#This.Name#", "SDC601", ArrayNew(1))#</cfoutput>
I will be saved if you tell me how to deal with it.
Thank you
Copy link to clipboard
Copied
Read the documentation on WriteLog here:
https://helpx.adobe.com/coldfusion/cfml-reference/coldfusion-functions/functions-t-z/writelog.html
Seems like you need to structure your writeLog statement a little differently?
Copy link to clipboard
Copied
沙耶石67903450 wrote
<cfoutput>#writeLog("DS001", "#This.Name#", "SDC601", ArrayNew(1))#</cfoutput>
The function writeLog takes 5 arguments. They are: type, text, application, file and log. (File and log may be interchangeable)
All of them have either string or boolean value. Therefore the value ArrayNew(1) is out of place. It is also unclear what the value of each of your 4 arguments is. To solve the problem, include the argument name in the function call, for example:
writeLog(type="error", file="DS001", application="yes", text="#This.Name#");