Status/Resolution/Reason: Closed/Withdrawn/
Reporter/Name(from Bugbase): Bryan H. / ()
Created: 02/25/2020
Components: Language, WDDX Serialization
Versions: 2018
Failure Type: Data Corruption
Found In Build/Fixed In Build: 2018,0,07,316715 /
Priority/Frequency: Normal / All users will encounter
Locale/System: English / Win 2016
Vote Count: 0
Problem Description:
the wddx serialization process converts undefined values to null, which in turn get deserialized to an empty string, so undefined values do not stay undefined.
Steps to Reproduce:
function test(a, b, c) {
writeDump(arguments); // shows initial structure
cfwddx(action="cfml2wddx", input=arguments, output="local.payload");
writeDump(local.payload); // shows incorrect conversion of undefined argument c to empty string during serialization
writeOutput(htmlCodeFormat(local.payload)); // shows undefined argument c serialized as <null/>
cfwddx(action="wddx2cfml", input=local.payload, output="local.vars");
writeDump(local.vars); // shows deserialized value of c is different from initial value
}
test(1, "hello");
Actual Result:
undefined values are serialized as <null /> in the wddx structure which is deserialized as an empty string
Expected Result:
undefined values should be omitted from the serialized result (this is what older versions of CF did, i.e. CF11)
Any Workarounds:
must check for empty string after checking for existence in any struct obtained from a wddx serialized source. -- No workaround if empty string is a valid value.
Attachments:
Comments: