Make WordPress Core


Ignore:
Timestamp:
07/17/2026 04:17:35 PM (7 weeks ago)
Author:
desrosj
Message:

REST API: sub-requests must always use dispatch.

Props xknown, johnbillion, joehoyle, jorbin, sergeybiryukov, ehtis, desrosj.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/rest-api/class-wp-rest-server.php

    r62617 r62769  
    284284         */
    285285        public function serve_request( $path = null ) {
     286                // Refuse to start a fresh top-level REST cycle while another dispatch
     287                // is already in flight. Internal sub-requests must use dispatch().
     288                if ( $this->is_dispatching() ) {
     289                        return false;
     290                }
     291
    286292                /* @var WP_User|null $current_user */
    287293                global $current_user;
Note: See TracChangeset for help on using the changeset viewer.