[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 17:54:58 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:
  fixed-major                                    |
-------------------------------------------------+-------------------------
Changes (by SergeyBiryukov):

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


Comment:

 In [changeset:"49332" 49332]:
 {{{
 #!CommitTicketReference repository="" revision="49332"
 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.
 Merges [49328] to the 5.5 branch.
 Fixes #51320.
 }}}

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


More information about the wp-trac mailing list