[wp-trac] [WordPress Trac] #51320: PHP Notice while moving post to trash (post_type has 2 registered taxonomies both with default_term set)

WordPress Trac noreply at wordpress.org
Tue Oct 27 16:40:51 UTC 2020


#51320: PHP Notice while moving post to trash (post_type has 2 registered
taxonomies both with default_term set)
---------------------------------------------+-----------------------------
 Reporter:  szaqal21                         |       Owner:  SergeyBiryukov
     Type:  defect (bug)                     |      Status:  closed
 Priority:  normal                           |   Milestone:  5.5.2
Component:  Posts, Post Types                |     Version:  5.5.1
 Severity:  normal                           |  Resolution:  fixed
 Keywords:  has-patch has-unit-tests commit  |     Focuses:
---------------------------------------------+-----------------------------
Changes (by SergeyBiryukov):

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


Comment:

 In [changeset:"49328" 49328]:
 {{{
 #!CommitTicketReference repository="" revision="49328"
 Posts, Post Types: Check if taxonomy is set for the `tax_input` parameter
 of `wp_insert_post()`.

 This avoids a PHP notice when creating a post with multiple taxonomies
 both having a default term.

 Props yakimun, szaqal21, hareesh-pillai, audrasjb.
 Fixes #51320.
 }}}

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


More information about the wp-trac mailing list