Null support for single page?

Is it possible to turn on null support in a specific .cfm file? I know there is a system setting in the admin. I am curious if this is possible?

I found this thread but it was still unclear to me:


I don’t believe there is a way to turn on null support from a .cfm on any kind of per request basis. The thread you linked is just referring to turning it on via an environment variable in your OS. It would work the same as the admin setting.

Looks like the ability to turn it on in Application.cfc will be available in Lucee 5.3 per

I can confirm, null support is a compiler setting which means the Lucee compiler must know if it is enabled before it even begins compiling a template. This means that it wouldn’t be possible to have a setting in the template that was read after the template was compiled and executing. Null support changes the keywords available to the language as well as the bytecode generation.

Now, that said, Adobe 2018 just implemented null support including a way to turn it off in Application.cfc which means they did it a bit differently as some sort of runtime check. As such, there’s a chance @micstriit may change Lucee to match at some point. It will probably depend on whether performance comes into play.

I wonder if you can still activate the Lucee script beta and use a .lucee extension to get a different compile time setting for null?

With Lucee 5.2 it was a compiler setting with 5.3 it is a runtime setting, so you can set in the application.cfc

see at 38:00

1 Like

Thanks for chiming in Micha! That makes good sense since I know we’re aiming for 2018 compat in 5.3.

Nice this helped me a lot! We have a very old coldfusion application running on Lucee and a new application. Somehow the old one gave errors and I found out it was due to this option. If I set this setting in the old application to false, nothing happend, but when I put it on partial support in the Lucee admin page and then set the full null support value in the new application, then both applications work! Finally lol

I have updated the docs to reflect this

1 Like