non-typesafe compare with null throws ExpressionException

Description

Having null support enabled, comparing a complex value against null throws an ExpressionException when using the non-typesafe operator ==. Using the typesafe operator === works as there is no attempt to cast the complex value.

 

 

This is an unexpected behavior and casting to String seems to indicate an improper fallback.

I would have expected it to work like Javascript:

This bug is possible related to .

Environment

Activity

Show:
Pothys - MitrahSoft
November 26, 2019, 8:10 AM

I've checked this ticket & confirmed the issue happened on lucee latest version 5.3.5.42-SNAPSHOT. If we check as per ACF means, structIsNull = (s == null); lucee throws an error for this. But, ACF works fine. If we use serialize(struct), it will works fine.

Michael Offner
December 20, 2019, 3:41 PM

CFML does not support comparsion of complex objects (struct, array,…), why acf does allow this in that case but not others makes no sense. i will do some more testing on this.

Assignee

Michael Offner

Reporter

Alexander Kwaschny

Priority

Minor

Labels

None

Fix versions

None

Affects versions

Configure