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

WordPress Trac noreply at wordpress.org
Mon Nov 18 20:59:41 UTC 2019


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

 * keywords:  has-patch => has-patch needs-unit-tests


Comment:

 I agree a notice would be preferable but better to stick with
 `_doing_it_wrong()` for the sake of consistency with the `post_type` check
 even though it's not quite right. (Don't get me started on the name of the
 function ;)

 @roytanck Are you able to add some unit tests for the WP_Query and
 capability changes? It's no problem if you don't have time or aren't clear
 on the process though.

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


More information about the wp-trac mailing list