Details
Details
Assignee
Michael Offner
Michael OffnerReporter
Brian Quackenbush
Brian QuackenbushPriority
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
Created 23 October 2020 at 15:06
Updated 4 December 2020 at 13:03
cfqueryparam null=true does not ignore the value attribute for cfsqltype="cf_sql_decimal".
The code below will result in the following error:
lucee.runtime.exp.CasterException: can't cast empty string to a number value at lucee.runtime.op.Caster.toDoubleValue(Caster.java:448) at lucee.runtime.op.Caster.toDoubleValue(Caster.java:396) at lucee.runtime.op.Caster.toDecimal(Caster.java:827) at lucee.runtime.tag.QueryParam.check(QueryParam.java:236) at lucee.runtime.tag.QueryParam.doStartTag(QueryParam.java:214)
This code works in ACF, and it actually works for other sql types in Lucee, but it does not work for cf_sql_decimal. This code should insert a NULL and ignore the fact that the value is not a number. A workaround for this is to use cf_sql_numeric vs. cf_sql_decimal, but I am not sure what implications that may have.
Here is an old Railo ticket that is similar to this issue:
https://issues.redhat.com/browse/RAILO-494?page=com.atlassian.jirafisheyeplugin%3Afisheye-issuepanel