tracker issue : CF-3923814

select a category, or use search below
(searches all categories and all time range)
Title:

[ANeff] Bug for: CF10 vs CF11 wrt now; and <cfset now> (for example)

| View in Tracker

Status/Resolution/Reason: Closed/Withdrawn/AsDesigned

Reporter/Name(from Bugbase): Aaron Neff / Aaron Neff (Aaron Neff)

Created: 01/20/2015

Components: Language

Versions: 11.0

Failure Type:

Found In Build/Fixed In Build: CF11_Final /

Priority/Frequency: Normal / Few users will encounter

Locale/System: ALL / Platforms All

Vote Count: 0

Except for a few built-in function names, CF11 allows builtInFunctionName; and <cfset builtInFunctionName> (ex: CF11 allows now; and <cfset now>).

CF10 always throws an exception, but CF11 only throws an exception for ParameterExists,Trace,PreserveSingleQuotes,Location,IsNull,WriteDump,ValueList,Throw,QuotedValueList,WriteLog.

Steps to reproduce:

1) Run this:

<cfscript>
  functionNames = structKeyList(getFunctionList());
  for(functionName in functionNames) {
	  if(!listFindNoCase("ParameterExists,Trace,PreserveSingleQuotes,Location,IsNull,WriteDump,ValueList,Throw,QuotedValueList,WriteLog", functionName)) {
		  writeOutput('<cfset ' & functionName & '>');//run output and see no exception in CF11 (CF10 throws exceptions)
		  //writeOutput(functionName & ';');//run output w/in <cfscript> tag and see no exception in CF11 (CF10 throws exceptions)
	  }
  }
</cfscript>

2) Take the generated output and run it

3) See no exceptions are thrown in CF11 but exceptions are always thrown in CF10

Certainly they should all throw an exception, right?

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	3923814

External Customer Info:
External Company:  
External Customer Name: Aaron
External Customer Email:

Attachments:

Comments:

Hi Aaron, This is an expected behaviour with ColdFusion 11, where except these functions : "ParameterExists,Trace,PreserveSingleQuotes,Location,IsNull,WriteDump,ValueList,Throw,QuotedValueList,WriteLog" , the other built-in functions are now being treated as ‘first-class’ functions so that any built-in function can be passed as an argument. Please refer the following links for further information: https://wikidocs.adobe.com/wiki/display/coldfusionen/Built-in+functions+as+first+class+citizen http://www.adobe.com/devnet/coldfusion/articles/language-enhancements.html Hence closing the bug.
Comment by S P.
8892 | April 16, 2015 12:55:40 AM GMT
Why O *why* do you implement something in such a way that you need to make caveats like this: where except these functions : "ParameterExists, Trace, PreserveSingleQuotes, Location, IsNull, WriteDump, ValueList, Throw, QuotedValueList, WriteLog" [etc] When you find yourself needing to start typing that sort of thing, do you not start thinking "we messed up the implementation here"?
Comment by External U.
8893 | January 09, 2016 05:05:41 AM GMT