[wp-trac] [WordPress Trac] #16464: get_term_by() returns WP_Error as well

WordPress Trac wp-trac at lists.automattic.com
Sun Feb 6 04:07:01 UTC 2011


#16464: get_term_by() returns WP_Error as well
---------------------------------+-----------------------------
 Reporter:  hakre                |       Owner:
     Type:  defect (bug)         |      Status:  new
 Priority:  normal               |   Milestone:  Future Release
Component:  Warnings/Notices     |     Version:  3.0
 Severity:  normal               |  Resolution:
 Keywords:  has-patch 3.2-early  |
---------------------------------+-----------------------------
Changes (by nacin):

 * keywords:  has-patch => has-patch 3.2-early
 * version:  3.1 => 3.0
 * milestone:  Awaiting Review => Future Release


Comment:

 If that is indeed the only way for get_term_by() to return WP_Error (and
 that's what it looks like), then the fix looks good. They already needed
 to look for false anyway, so I'm fine with preventing the possibility of
 WP_Error being returned through get_term_by().

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/16464#comment:6>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list