[wp-trac] [WordPress Trac] #41035: Don't return if WP_Error object return by wp_insert_term() from foreach() loop in wp_set_object_terms()

WordPress Trac noreply at wordpress.org
Tue May 1 15:21:53 UTC 2018


#41035: Don't return if WP_Error object return by wp_insert_term() from foreach()
loop in wp_set_object_terms()
--------------------------+------------------------------
 Reporter:  chandrapatel  |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Taxonomy      |     Version:  4.7
 Severity:  normal        |  Resolution:
 Keywords:  needs-patch   |     Focuses:  administration
--------------------------+------------------------------

Comment (by pbiron):

 > So this will take some retooling of the way the $terms loop works.

 Agreed.

 Also, I think the hardest part might be writing **good** documentation so
 that callers understand that just because `wp_set_object_terms()` returns
 a `WP_Error` does NOT mean that NO terms were set.

 Unfortunately, I don't have the bandwidth at the moment to work on this
 :-(

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


More information about the wp-trac mailing list