Skip to content

structKeyExists #1630

Description

@bagnacauda

The description should be updated to reflect the fact that if used on a scope, such as arguments, the function returns false even though the key is present (as seen using writeDump), with value undefined.

Tested on every Adobe ColdFusion version on trycf.com

Short example

<cfscript>
function testFunction(whatever) {
    writeDump(var=arguments, label='arguments');
    if(structKeyExists(arguments, 'whatever')) {
        return 'found';
    } else {
        return 'not found';
    }
}

</cfscript>

<cfoutput>
    #testFunction()#
</cfoutput>

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions