Allow Type Checking Functions to Accept Null Values in Partial Null Support

Description

Currently if we check for example:

isArray(noSuchVariables) isBoolean(noSuchVariables) isQuery(noSuchVariables)

etc., we get an error that the variable does not exist.

A much better return value would be a simple `false`, since the value passed into isXxx() is not Xxx. We can already check isNull(noSuchVariables), so we should be able to similarly pass noSuchVariables into the ixXxx().

Why do we need to check !isNull(noSuchVariables) && isXxx(noSuchVariables)? If the question is isXxx() and the value is null, then the answer is false, which is exactly what isNull(noSuchVariables) returns.

Environment

None

Activity

Show:

Michael Offner 9 September 2019 at 14:29

this would break a lot of existing code, but i agree that this would be a nice addition. so it should not work out of the box that way.

Details

Assignee

Reporter

Priority

Labels

New Issue warning screen

Before you create a new Issue, please post to the mailing list first https://dev.lucee.org

Once the issue has been verified, one of the Lucee team will ask you to file an issue

Created 18 August 2017 at 00:35
Updated 19 May 2021 at 11:58