Prevent an error in WP 4.9.12 from field sanitization #39
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Steps to reproduce
wp core update --version=4.9.12 --force
7.3
if you canBackground
This error is from:
cloudinary_wordpress/cloudinary-image-management-and-manipulation-in-the-cloud-cdn/php/class-settings-page.php
Line 415 in 9b10a98
One of the values that is passed to
sanitize_text_field()
is:sanitize_text_field
passes that to_sanitize_text_fields()
. That's not a problem in WP 5.0+, I think. It now exits for values like closures.But in WP 4.9, it didn't yet check the type, and it caused the error here.
This PR should back-port the WP 5.0 functionality to 4.9. There's no expected change in behavior in WP 5.0+.
But this could use good regression testing on the 'Global Transformations' screens, like at /wp-admin/admin.php?page=cld_global_transformation&tab=global_video_transformations