You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 24, 2018. It is now read-only.
Repository navigation
This repository was archived by the owner on Sep 24, 2018. It is now read-only.
API should error when attempting to update a registered meta field holding an invalid value #2838
Registering a meta field defines the data type that field should contain, but there are ways outside of the API's purview that a post could come to hold an invalid value in that meta field, such as a serialized object, which does not match the registered type. If the API tries to update the value of a meta object and the API discovers that an invalid type of data is being stored in that field, it should return an error rather than replacing the value of that field.
Based on discussion following #2765:
Registering a meta field defines the data type that field should contain, but there are ways outside of the API's purview that a post could come to hold an invalid value in that meta field, such as a serialized object, which does not match the registered type. If the API tries to update the value of a meta object and the API discovers that an invalid type of data is being stored in that field, it should return an error rather than replacing the value of that field.