[wp-trac] [WordPress Trac] #17938: Prevent fatal errors caused by admin-ajax.php's use of wp_insert_term()

WordPress Trac wp-trac at lists.automattic.com
Thu Jun 30 00:14:17 UTC 2011


#17938: Prevent fatal errors caused by admin-ajax.php's use of wp_insert_term()
----------------------------+-----------------------------
 Reporter:  mdawaffe        |      Owner:
     Type:  defect (bug)    |     Status:  new
 Priority:  normal          |  Milestone:  Awaiting Review
Component:  Administration  |    Version:  3.2
 Severity:  normal          |   Keywords:  has-patch
----------------------------+-----------------------------
 {{{wp_insert_term()}}} can return a {{{WP_Error}}}, but admin-ajax.php
 does not catch these errors.  In two places (when adding post and link
 categories during post/link creation), the result of
 {{{wp_insert_term()}}} is blindly assumed to be an array, which will cause
 a fatal error.

 Attached checks for errors and skips that category.  The patch does not
 implement any error messaging to the user.

 See also #17936.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/17938>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list