Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

About parse error of coldfusion2016

New Here ,
Jul 12, 2017 Jul 12, 2017

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

467
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Jul 12, 2017 Jul 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?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 12, 2017 Jul 12, 2017
LATEST

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources