Answered
ColdFusion safe-navigation-operator used like boolean
Hi,
i use this code in CF2023
<cfscript>
params = {
field1 = true
};
foo(args=params);
void function foo(required struct args) {
if (arguments.args?.field2) {
writeOutput("entra");
} else {
writeOutput("non entra");
}
}
</cfscript>but i receive error
Cannot invoke "Object.getClass()" because "x" is null
in first time, after only java.lang.NullPointerException
In CF2025 continue with previuos error
Am I doing something wrong or is this a bug?
