2

We're upgrading some of our applications from CF10 to CF2018.

On CF2018, we've unchecked 'Enable Null Support' in the ColdFusion Administrator, and we can see when we output the value of enableNullSupport that it is set to NO. However, but we're still seeing behaviour which suggests that Nulls are enabled.

e.g. When we create an object with a property (eg FirstName) which is not initialised, the expression getFirstName() eq "", which previously was true, is now false and IsNull(getFirstName()) is true

The article on Null support in ColdFusion 2018 says:

Now in your ColdFusion applications, you can assign null to a variable, as shown below:

<cfset price = null>

But if you try this line at https://cffiddle.org (with CF2018 selected), you get - Variable NULL is undefined.

It looks like the documentation around support for Null is misleading.

Community
  • 1
  • 1
GavinPen
  • 83
  • 7
  • 1
    Try running code that should work if null is enabled. If that fails then there is likely some other change with components affecting you. Are you testing on the latest update for 2018? – Dan Roberts Aug 20 '19 at 14:33
  • thanks. I'm currently only able to test using a local docker-vagrant container (built from image eaps-docker-coldfusion.bintray.io/cf/coldfusion:latest). There runs OK if Null Support is on, but otherwise gives 'Variable NULL is undefined' – GavinPen Aug 21 '19 at 15:31

1 Answers1

2

I contacted Adobe Support, who were able to replicate the issue, and came back to confirm that it was a bug. They sent me a patch which has fixed the issue. The patch will be included in a future update to cf2018

GavinPen
  • 83
  • 7
  • So just to clarify, which issue(s) does the patch fix? Does the same apply to CF2016? – SOS Sep 09 '19 at 15:40
  • 1
    The main issue we had was that: when 'enable null support' was set off, for a property which hadn't been initialised, `getProperty() eq ""` returned FALSE. After installing Adobe's patch, the expression returns TRUE - so the issue has been fixed. I don't know if this applies to CF2016 – GavinPen Sep 18 '19 at 11:25