Real-time collaboration: prevent fall-through in sync polling server.
When a user sends a stale compaction update to WP_HTTP_Polling_Sync_Server, it falls through the switch statement and results in a rest_invalid_update_type error (bad request). This generally has no ill effect since the compaction request is rescinded on the next polling cycle, but it could cause confusion for users who are monitoring client-side requests or server logs. To fix, replace the break after the $has_newer_compaction check with return true so that the stale compaction is silently discarded instead of falling through. Covered by unit test. Developed in: https://github.com/WordPress/wordpress-develop/pull/11118. Syncs: https://github.com/WordPress/gutenberg/pull/76060. Fixes #64781. Props czarate, mindctrl. git-svn-id: https://develop.svn.wordpress.org/trunk@61839 602fd350-edb4-49c9-b593-d223f7449a82
E
Ella Van Durpe committed
fbc42cd299f8ac7c0436db27ea2b200ab2561a04
Parent: 3996a64