UDF cannot be treated as string

Description

Adobe ColdFusion allows a UDF reference to be compared to a string without erroring. I think Adobe is incorrect in this and it serves no real purpose, but I wanted to document the incompatibility has it caused an error in a library i tried to port from Adobe CF to Lucee.

https://www.trycf.com/gist/acb44d2bc791c86461d9ee4ae084c255/acf2018?theme=monokai

This code;

returns "NO" in Adobe ColdFusion, but throws an error in Lucee.

This line in this library is where I found the issue:
https://github.com/GiancarloGomez/sentry-cfml/blob/fe41af4e0e57e17330a74c7850c67cbd93ac3059/sentry.cfc#L564

For what it's worth, I don't think that line of code actually makes sense nor works as the original author intended, but nonetheless, Adobe didn't error on it and Lucee does.

If Lucee decides not to provide complatibilty for this, then please specify why in the comments and reject the ticket and this will just stand as documentation to that fact.

Assignee

Unassigned

Reporter

Brad Wood

Labels

Priority

Minor
Configure