StructKeyExists(), arguments and null support (was: Anyone know when the Lucee 5 final will be released?)

There was an issue in Railo 4.2.1 where if null support was enabled,
StructKeyExists( arguments,“whatever” ) would always return true if
you used named arguments in the call. But this was fixed in the Railo
4.2.2 Preview.

Since Lucee 4.5 was forked from that 4.2.2 Preview, the fix came too.
So StructKeyExists() will behave correctly whether you have null
support on or not.

See this post for more details:

http://cfsimplicity.com/89/migrating-from-coldfusion-to-railo-part-4-null-and-function-arguments

And these tickets in the Railo tracker:

https://issues.jboss.org/browse/RAILO-3098
https://issues.jboss.org/browse/RAILO-3274

Julian.On 28 September 2015 at 20:31, Scott Smith <@Scott_Smith> wrote:

Is that with full support enabled? I have partial support enabled (as this
was our Railo setting) and I do not see that issue with the following
snippet:

<cfset testNullSupport() />

If the issue you described exists with the partial support setting, that
would be a huge undertaking to find all uses of structKeyExists for
non-required arguments in functions. Hoping that is not the case.

On Mon, Sep 28, 2015 at 1:57 PM, Jon Clausen <@Jon_Clausen> wrote:

The one issue I’ve seen in 4.5 is that structKeyExists() returns true even
when an argument isn’t passed to a function.

Awesome, thanks for digging this up!On Tue, Sep 29, 2015 at 3:26 AM, Julian Halliwell <@Julian_Halliwell wrote:

There was an issue in Railo 4.2.1 where if null support was enabled,
StructKeyExists( arguments,“whatever” ) would always return true if
you used named arguments in the call. But this was fixed in the Railo
4.2.2 Preview.

Since Lucee 4.5 was forked from that 4.2.2 Preview, the fix came too.
So StructKeyExists() will behave correctly whether you have null
support on or not.

See this post for more details:

http://cfsimplicity.com/89/migrating-from-coldfusion-to-railo-part-4-null-and-function-arguments

And these tickets in the Railo tracker:

https://issues.jboss.org/browse/RAILO-3098
https://issues.jboss.org/browse/RAILO-3274

Julian.

On 28 September 2015 at 20:31, Scott Smith <@Scott_Smith> wrote:

Is that with full support enabled? I have partial support enabled (as
this
was our Railo setting) and I do not see that issue with the following
snippet:

<cfset testNullSupport() />

If the issue you described exists with the partial support setting, that
would be a huge undertaking to find all uses of structKeyExists for
non-required arguments in functions. Hoping that is not the case.

On Mon, Sep 28, 2015 at 1:57 PM, Jon Clausen < @Jon_Clausen> wrote:

The one issue I’ve seen in 4.5 is that structKeyExists() returns true
even

when an argument isn’t passed to a function.


See Lucee at CFCamp Oct 22 & 23 2015 @ Munich Airport, Germany - Get your
ticket NOW - http://www.cfcamp.org/

You received this message because you are subscribed to the Google Groups
“Lucee” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to lucee+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/CAC_5Vor15B3g4Fd0XbxfqCSWoazbLfHXk6uqMSRJU5KavPCDag%40mail.gmail.com
.
For more options, visit https://groups.google.com/d/optout.