wordpress-develop
wordpress-develop copied to clipboard
Harden REST request parameter sanitization
This PR improves defensive handling in WP_REST_Request::sanitize_params() by validating parameter types before applying sanitize callbacks.
Benefits:
- Prevents PHP warnings on malformed or unexpected input
- Ensures arrays are sanitized item-by-item
- Improves data integrity for REST API requests
- Aligns with secure coding practices in WordPress core