[wp-trac] [WordPress Trac] #55877: wp_insert_post() should check that a post type exists before using it

WordPress Trac noreply at wordpress.org
Tue May 31 08:38:23 UTC 2022


#55877: wp_insert_post() should check that a post type exists before using it
----------------------------------------+---------------------
 Reporter:  Chouby                      |       Owner:  (none)
     Type:  defect (bug)                |      Status:  new
 Priority:  normal                      |   Milestone:  6.1
Component:  Posts, Post Types           |     Version:  5.1
 Severity:  normal                      |  Resolution:
 Keywords:  has-patch needs-unit-tests  |     Focuses:
----------------------------------------+---------------------

Comment (by mukesh27):

 Hi there!

 I reproduced the issue fresh WordPress with the 6.1-alpha-53451 version
 and it is one additional warning.

 `PHP Warning:  Attempt to read property "publish_posts" on null in wp-
 includes\post.php on line 4158`

 After the [attachment:"55877.patch"] patch it will now show any error in
 log.

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


More information about the wp-trac mailing list