Skip to content

structKeyExists #1630

@bagnacauda

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>

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