[wp-trac] [WordPress Trac] #37721: improve error handling of is_object_in_term in taxonomy.php

WordPress Trac noreply at wordpress.org
Thu Aug 18 16:39:21 UTC 2016


#37721: improve error handling of is_object_in_term in taxonomy.php
--------------------------+-----------------------------
 Reporter:  rpayne7264    |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Taxonomy      |    Version:  4.6
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 Line 4276 in taxonomy.php can return a WP_Error object, which is not
 checked before calling wp_list_pluck().

 Result is a fatal error:

 Fatal error: Cannot use object of type WP_Error as array in /wp-
 includes/functions.php on line 3511

 The code should pass the WP_Error object to the calling function.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/37721>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list