Skip to main content
沙耶石67903450
Participant
July 12, 2017
Question

About parse error of coldfusion2016

  • July 12, 2017
  • 2 replies
  • 505 views

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

    This topic has been closed for replies.

    2 replies

    BKBK
    Community Expert
    Community Expert
    July 13, 2017

    沙耶石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#");

    Inspiring
    July 12, 2017

    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?