[wp-trac] [WordPress Trac] #45677: REST Autosaves Controller creating extra instance of a post type REST controller

WordPress Trac noreply at wordpress.org
Wed Oct 2 01:37:54 UTC 2019


#45677: REST Autosaves Controller creating extra instance of a post type REST
controller
--------------------------------------+--------------------------------
 Reporter:  pat@…                     |       Owner:  TimothyBlynJacobs
     Type:  defect (bug)              |      Status:  reopened
 Priority:  normal                    |   Milestone:  5.3
Component:  REST API                  |     Version:  5.0
 Severity:  normal                    |  Resolution:
 Keywords:  has-patch has-unit-tests  |     Focuses:  rest-api
--------------------------------------+--------------------------------

Comment (by TimothyBlynJacobs):

 > I can work on a patch to add those checks
 Awesome, thank you!

 > but could you clarify what you mean by validating the
 rest_controller_class?
 We always want to make sure that `::get_rest_controller()` is an instance
 of the `rest_controller_class` and the `rest_controller_class` subclasses
 `WP_REST_Controller`.

 -----

 That's an interesting case. I'm fine with changing the accessibility to
 `public`. Especially given the extra validation.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/45677#comment:34>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list