With this code:
<cfset foo = {}> <cfset exists1 = !isDefined("foo.foo")> <cfset exists2 = isNull(foo.foo)> <cfset exists3 = isNull(foo['foo'])>
Railo passes normally (all True), and CF throws an exception in the last line.
coldfusion.runtime.UndefinedElementException: The foo element is undefined in the CFML structure designated as part of the expression.
I always thought that the dot and square brackets in CFML should be functionally equivalent, in addition to the fact that the square brackets can define case-sensitive keys.
The error I reported here was recently marked "NotABug".
Can someone explain why?
source share