argument collection seems to be being differently to ACF here, it seems to be creating an arguments key even though it’s not passed in which allows keyExists to pass but the value is NULL. It should fail the keyExists check:
test.cfm
test.cfc
Errors with: Cannot invoke method [len()] on a null object - arguments.keyExists('missingKey')should not be true
stack trace:
Activity
Show:
Brad Wood November 15, 2024 at 8:28 PM
It doesn’t really matter what version of BoxLang you’re on. The fix went into the compat module on Nov 1st, but the compat module hasn’t had a stable release since Oct 31st.
Are you using the snapshot version of the compat module? I assume it simply got skipped on accident when we cut the last Boxlang beta.
Doug Cain November 14, 2024 at 2:55 PM
current snapshot still has same error Cannot invoke method [len()] on a null object when running the test code above.
Doug Cain November 5, 2024 at 11:43 AM
I just tried my test code above on beta21 and it fails with the same error.
Brad Wood November 1, 2024 at 5:09 AM
The compat module now handles this.
Brad Wood October 25, 2024 at 8:49 PM
Why is this ticket marked resolved? No fix has been put in for it yet. At least, not by me.
Fixed
Pinned fields
Click on the next to a field label to start pinning.
argument collection seems to be being differently to ACF here, it seems to be creating an arguments key even though it’s not passed in which allows keyExists to pass but the value is NULL. It should fail the keyExists check:
test.cfm
test.cfc
Errors with: Cannot invoke method [len()] on a null object -
arguments.keyExists('missingKey')
should not be truestack trace: