[wp-trac] [WordPress Trac] #49695: REST API check_template function can return false error

WordPress Trac noreply at wordpress.org
Sat May 16 21:52:40 UTC 2020


#49695: REST API check_template function can return false error
-------------------------------------------------+-------------------------
 Reporter:  Kipperlenny                          |       Owner:  (none)
     Type:  defect (bug)                         |      Status:  new
 Priority:  normal                               |   Milestone:  Awaiting
                                                 |  Review
Component:  REST API                             |     Version:  4.9
 Severity:  normal                               |  Resolution:
 Keywords:  2nd-opinion dev-feedback needs-      |     Focuses:  rest-api
  patch needs-unit-tests                         |
-------------------------------------------------+-------------------------

Comment (by spacedmonkey):

 I am not against adding the following lines at the start of
 `check_template` method.

 {{{#!php
 $post = $this->get_post( $request['id'] );
                 if ( is_wp_error( $post ) ) {
                         return $post;
                 }

 }}}


 I don't understand why the issue is happening?

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


More information about the wp-trac mailing list