[wp-trac] [WordPress Trac] #61970: Fatal error: Attempt to read property "ID" on null in /src/wp-includes/rest-api/endpoints/class-wp-rest-autosaves-controller.php

WordPress Trac noreply at wordpress.org
Mon Sep 2 16:20:27 UTC 2024


#61970: Fatal error: Attempt to read property "ID" on null in /src/wp-includes
/rest-api/endpoints/class-wp-rest-autosaves-controller.php
--------------------------------+------------------------------------------
 Reporter:  antonvlasenko       |      Owner:  (none)
     Type:  defect (bug)        |     Status:  new
 Priority:  normal              |  Milestone:  Awaiting Review
Component:  REST API            |    Version:  trunk
 Severity:  normal              |   Keywords:  needs-patch needs-unit-tests
  Focuses:  template, rest-api  |
--------------------------------+------------------------------------------
 This error occurs when a user tries to fetch autosave posts or revisions
 for a template (template part) that is file-based and does not have an
 associated entity in the posts table.
 The returned HTTP code is 403, which is also incorrect.
 Both the fatal error and the HTTP code need to be fixed.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/61970>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list