[wp-trac] [WordPress Trac] #30472: get_terms_to_edit() can return a WP_Error, but used as a string

WordPress Trac noreply at wordpress.org
Sun Dec 28 04:48:14 UTC 2014


#30472: get_terms_to_edit() can return a WP_Error, but used as a string
-----------------------------------------+-----------------------------
 Reporter:  dd32                         |       Owner:
     Type:  defect (bug)                 |      Status:  new
 Priority:  normal                       |   Milestone:  Future Release
Component:  Taxonomy                     |     Version:
 Severity:  normal                       |  Resolution:
 Keywords:  has-patch reporter-feedback  |     Focuses:  administration
-----------------------------------------+-----------------------------
Changes (by valendesigns):

 * keywords:  needs-patch => has-patch reporter-feedback


Comment:

 This patch should stop fatal PHP errors from being thrown when the value
 of `get_terms_to_edit()` is a `WP_Error` or `boolean`.

 @dd32 could you please provide some information on how you caused the
 error in the first place so I can properly test the patch and also write
 unit tests if needed.

 Cheers,
 Derek

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


More information about the wp-trac mailing list