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

WordPress Trac noreply at wordpress.org
Mon Nov 18 21:13:36 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:
----------------------------------------+------------------------------

Comment (by roytanck):

 Replying to [comment:5 peterwilsoncc]:
 > 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.
 >

 I'd love to dive into (WP) unit testing if I had more time, but somehow,
 WP_Query does not sound like the best place for first baby steps. Also,
 time unfortunately is an issue. If someone else could jump in, that would
 help keep this ticket moving.

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


More information about the wp-trac mailing list