Test for null or empty strings when deserializing dates#1600
Conversation
|
Hi! |
|
I've added tests. I was wondering about the BC, I'm not 100% sure, however I would think that anyone running into this issue may have created their own DateTime handler for deserialization. If they didn't they would get an exception from line 275 of DateHandler.php, which is what happened to us. The change makes those custom handlers obsolete if that is all they do. Otherwise, I'm not sure what behaviour one would expect from this. I get its a change so I'm fine either way but it seems like a safe fix imo |
|
Thanks for contribution! |
Some APIs send empty dates instead of null or omitting the field. For example
Currently only
"someDateField": nullworks. Changing the null test to an empty test allows for the system to skip deserializing empty date fields.