Skip to content

Element is undefined in struct - throws error #9

@murrah

Description

@murrah

I am testing your CFC by throwing it curved balls. eg

s = {
	a = "abc",
	b = javaCast('null', 0),
	c = "123"
};

This threw an error at line 277 where this fails: serializeInput( input[ key ], hint );

I replaced that line with

if ( structKeyExists(input, key) ) {
	serializeInput( input[ key ], hint );	
} else {
	writeOutput('""');
}

ie output an empty string. BUT... maybe should output writeOutput('"null"'); ????

I didn't make a PR because I am not sure I know what I am doing with GitHub and none of the other PRs seem to have been acted on. ;-)

Thanks Ben!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions