[wp-trac] [WordPress Trac] #31134: register_post_type() should call a _doing_it_wrong() when called with an empty post type name

WordPress Trac noreply at wordpress.org
Mon Jan 26 04:43:37 UTC 2015


#31134: register_post_type() should call a _doing_it_wrong() when called with an
empty post type name
----------------------------------------+------------------
 Reporter:  tyxla                       |       Owner:
     Type:  defect (bug)                |      Status:  new
 Priority:  normal                      |   Milestone:  4.2
Component:  Posts, Post Types           |     Version:  3.0
 Severity:  minor                       |  Resolution:
 Keywords:  has-patch needs-unit-tests  |     Focuses:
----------------------------------------+------------------
Changes (by DrewAPicture):

 * keywords:  has-patch close => has-patch needs-unit-tests
 * type:  enhancement => defect (bug)
 * severity:  normal => minor
 * milestone:  Awaiting Review => 4.2


Comment:

 As I suggested on #31135, I think we can double up on the
 `_doing_it_wrong()` call by defining the minimum and maximum in the same
 condition and string. It would be also be helpful to have a unit test to
 cover the empty string case.

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


More information about the wp-trac mailing list