[wp-trac] [WordPress Trac] #63488: Wrong return value for get_category_by_path()

WordPress Trac noreply at wordpress.org
Tue May 27 15:33:38 UTC 2025


#63488: Wrong return value for get_category_by_path()
--------------------------+------------------------------
 Reporter:  milana_cap    |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Taxonomy      |     Version:
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |     Focuses:  docs
--------------------------+------------------------------

Comment (by opurockey):

 In line 157[https://github.com/WordPress/wordpress-
 develop/blob/666ebd8731818af64f135a28aaffb90881b7ed8c/src/wp-
 includes/category.php#L157], There might be a slight possibility ( not
 zero ) that `get_term()` could return WP_Error in some cases.

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


More information about the wp-trac mailing list