Adam Cameron
isObject & `isValid`: https://trycf.com/gist/68714a07fd05f75f9edb7c05b7db0a47/lucee5?setupCodeGistId=816ce84fd991c2682df612dbaf1cad11&theme=monokai
Compare behaviours of CF's baseline expectations, and Lucee.
Lucee's behaviour is inconsistent with CF's, and also internally inconsistent.
Or am I missing something?zackster
11/01/2022, 10:40 AMdswitzer
11/01/2022, 11:21 AMisObjectChecker does not require the object argument, so arguments.object ends up being null and isObject(nullValue()) is false. If you change the isObjectChecker to:
var isObjectChecker = (required component object) => isObject(arguments.object)
Then the code throws an exception.
So I think this issue is really in how Lucee deals with null values.dswitzer
11/01/2022, 11:23 AMobject argument required all the tests pass.dswitzer
11/01/2022, 11:24 AMnull settings might change the behavior so that having required is not needed.Adam Cameron
isObject in the given context. The context being: the value it's being called on isn't defined.Adam Cameron
dswitzer
11/01/2022, 12:08 PMisObject(nullValue()) returns false . This is why your tests are not throwing an exception. Since the arguments.object value is null, the isObject() call is returning false.dswitzer
11/01/2022, 12:12 PMisObject() and isValid() calls, it's the difference between the way Lucee & ACF handle the arguments.dswitzer
11/01/2022, 12:13 PMdswitzer
11/01/2022, 12:17 PMarguments.object is related to the null settings in the Lucee Admin. (But I could be wrong about that.)zackster
11/01/2022, 12:39 PMAdam Cameron