Issues
- CFParam treats a default value of "NULL" as a null valueLDEV-4363Resolved issue: LDEV-4363Pothys - MitrahSoft
- QoQ throwing "lucee.runtime.exp.NativeException: Index 7 out of bounds for length 7" exceptionsLDEV-3849Resolved issue: LDEV-3849
- CFQUERY using attributeCollection fails when inside CFFINALLYLDEV-3847Michael Offner
- Arguments with type of "numeric" are not being cast to doubleLDEV-3056Resolved issue: LDEV-3056Michael Offner
- This code freeze server.LDEV-2738Resolved issue: LDEV-2738Michael Offner
CFParam treats a default value of "NULL" as a null value
Description
Environment
Any
Details
Assignee
Pothys - MitrahSoftPothys - MitrahSoftReporter
dan.switzer@givainc.comdan.switzer@givainc.comPriority
NewLabels
New Issue warning screen
Before you create a new Issue, please post to the mailing list first https://dev.lucee.org
Once the issue has been verified, one of the Lucee team will ask you to file an issue
Affects versions
Details
Details
Assignee
Reporter
Priority
Labels
New Issue warning screen
Before you create a new Issue, please post to the mailing list first https://dev.lucee.org
Once the issue has been verified, one of the Lucee team will ask you to file an issue
Affects versions
Activity
Zac Spitzer6 January 2023 at 14:45
https://github.com/lucee/Lucee/commit/9291a90104b2028b2a16a8cc387b73e7accdc72c 5.3
https://github.com/lucee/Lucee/commit/4f3956a8b4e77d5e187975469fde50a961421567 6.0
https://github.com/lucee/Lucee/commit/544a2fdd37c551e603f9313933eab23ae1e470b0 5.4
https://github.com/lucee/Lucee/commit/f504142f64fff3e33acd8c5329c9a00cc76f98ae 5.4
Zac Spitzer6 January 2023 at 12:26
@Pothys - MitrahSoft a change which caused a regression ain’t fixed yet!
Pothys - MitrahSoft6 January 2023 at 12:24
I've checked this ticket with the Lucee fixed version 6.0.0.329-SNAPSHOT. Now cfparam with default "NULL" works fine.
Zac Spitzer5 January 2023 at 18:40
caused a NPE with hibernate https://github.com/lucee/Lucee/actions/runs/3849016581 and https://github.com/lucee/Lucee/actions/runs/3848945573
So I've stumbled on a weird behavior, which seems like a bug to me (it certainly does not match ACF behavior):
https://www.trycf.com/gist/5c8ab610df9eba0a32fbf72951d67c68/lucee5?theme=monokai
When a
param
uses a string value ofNULL
for thedefault
attribute, Lucee seems to be treat this as saying "Make this parameter null", which generates an error:<cfscript> param name="form.thisShouldDefaultToAString" default="NULL"; writeDump(form); </cfscript>
If you change the string from
NULL
tonull
then it works as expected. If you add atype
attribute ofstring
, then it generates an empty string:<cfscript> param name="form.thisShouldDefaultToAString" type="string" default="NULL"; writeDump(form); </cfscript>
So it appears that the string
NULL
has some special meaning when used incfparam
.