[wp-trac] [WordPress Trac] #25429: `get_the_category_by_ID` triggers PHP notice on non-existent category

WordPress Trac noreply at wordpress.org
Sat Sep 28 00:22:58 UTC 2013


#25429: `get_the_category_by_ID` triggers PHP notice on non-existent category
--------------------------+------------------
 Reporter:  ericmann      |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  3.7
Component:  Taxonomy      |     Version:  2.3
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |
--------------------------+------------------

Comment (by ericmann):

 That works for me. I was more concerned about using functions internally
 that can return `null` then immediately trying to access
 `$category->name`, which is what triggered the notice.

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


More information about the wp-trac mailing list