[wp-trac] [WordPress Trac] #45267: REST API: get_the_excerpt() on empty post_excerpt causes request to fail

WordPress Trac noreply at wordpress.org
Wed Jul 13 13:08:58 UTC 2022


#45267: REST API: get_the_excerpt() on empty post_excerpt causes request to fail
-------------------------------+------------------------
 Reporter:  rogerlos           |       Owner:  (none)
     Type:  defect (bug)       |      Status:  closed
 Priority:  normal             |   Milestone:
Component:  Posts, Post Types  |     Version:  4.9.8
 Severity:  normal             |  Resolution:  duplicate
 Keywords:  close              |     Focuses:  rest-api
-------------------------------+------------------------
Changes (by hellofromTonya):

 * status:  new => closed
 * resolution:   => duplicate
 * milestone:  Awaiting Review =>


Comment:

 This issue has been resolved:

 * #44534 / [43983] silenced the PHP warnings in JSON responses
 * #36934 / [44941] added a guard clause to verify `$post` is an instance
 of `WP_Post`

 As [44941] prevents the PHP warning, marking this ticket as a duplicate of
 #36934, ie meaning that ticket resolved this issue.

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


More information about the wp-trac mailing list