[wp-trac] [WordPress Trac] #48653: PHP Notices when requesting a post with an unregistered status

WordPress Trac noreply at wordpress.org
Wed Feb 5 01:31:51 UTC 2020


#48653: PHP Notices when requesting a post with an unregistered status
----------------------------------------+-----------------------------
 Reporter:  roytanck                    |       Owner:  SergeyBiryukov
     Type:  defect (bug)                |      Status:  closed
 Priority:  normal                      |   Milestone:  5.4
Component:  Posts, Post Types           |     Version:  3.0
 Severity:  normal                      |  Resolution:  fixed
 Keywords:  has-patch needs-unit-tests  |     Focuses:
----------------------------------------+-----------------------------
Changes (by SergeyBiryukov):

 * status:  reopened => closed
 * resolution:   => fixed


Comment:

 In [changeset:"47181" 47181]:
 {{{
 #!CommitTicketReference repository="" revision="47181"
 Posts, Post Types: Fail gracefully when checking whether a single post
 with an unregistered post status should be displayed in
 `WP_Query::get_posts()`.

 If the post status is not registered, assume it's not public, but still
 allow access to users with edit permissions (same as for a protected post
 status, e.g. `draft`), so that they could recover orphaned content.

 Add unit tests.

 Follow-up to [47178].

 Props roytanck, SergeyBiryukov.
 Fixes #48653.
 }}}

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


More information about the wp-trac mailing list