Skip to content
This repository was archived by the owner on Feb 4, 2025. It is now read-only.

Fix issue of deserializing /wp/v2/media response when having an empty media_details.sizes property #3112

Merged
merged 1 commit into from
Nov 27, 2024

Conversation

hichamboushaba
Copy link
Member

@hichamboushaba hichamboushaba commented Nov 22, 2024

Part of fixing woocommerce/woocommerce-android#12989

This PR adds a fix to the issue of parsing the /wp/v2/media response when media_details.sizes contains an array instead of the expected object type.

To test: woocommerce/woocommerce-android#12990

Verified

This commit was signed with the committer’s verified signature.
florianduros Florian Duros
… it's empty
Copy link
Contributor

@JorgeMucientes JorgeMucientes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested it in the linked PR for testing and everything worked as expected.

@hichamboushaba hichamboushaba merged commit b1086fc into trunk Nov 27, 2024
13 checks passed
@hichamboushaba hichamboushaba deleted the wp-v2-media-fix-issue branch November 27, 2024 11:22
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants