d1rtym0nk3y
05/19/2023, 8:26 AM<cfscript>
if(structKeyExists(rc, "myvalue")) {
dump(rc.myvalue);
function test() {
return rc;
}
try {
test();
}
catch(any e) {
dump(e);
}
}
</cfscript>
which correctly dumps rc.myvalue, and then catches this error
The key [rc] does not exist.
lucee.runtime.exp.ExpressionException: The key [rc] does not exist.
at lucee.runtime.type.scope.UndefinedImpl.get(UndefinedImpl.java:240)
at lucee.runtime.type.scope.UndefinedImpl.get(UndefinedImpl.java:184)
at views.main.test_cfm$cf$c7h.udfCall(/views/main/test.cfm:4)
maybe i'm not remembering this correctly, but i thought functions had access to the calling context variableszackster
05/19/2023, 9:03 AMd1rtym0nk3y
05/19/2023, 9:15 AMd1rtym0nk3y
05/19/2023, 9:16 AM