[wp-trac] [WordPress Trac] #25429: `get_the_category_by_ID` triggers PHP notice on non-existent category
WordPress Trac
noreply at wordpress.org
Thu Mar 13 04:03:07 UTC 2014
#25429: `get_the_category_by_ID` triggers PHP notice on non-existent category
-----------------------------------+-----------------------------
Reporter: ericmann | Owner: wonderboymusic
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 3.9
Component: Taxonomy | Version: 2.3
Severity: normal | Resolution: fixed
Keywords: has-patch 2nd-opinion | Focuses:
-----------------------------------+-----------------------------
Changes (by wonderboymusic):
* owner: => wonderboymusic
* status: new => closed
* resolution: => fixed
Comment:
In [changeset:"27521"]:
{{{
#!CommitTicketReference repository="" revision="27521"
Avoid a notice in `get_the_category_by_ID()` when `is_wp_error( $term )`
is false but `$term->name` is not set. Clarify the `@return` value of
`get_category()` and `get_tag()` which return the same possible types as
`get_term()`, which they wrap.
Props ericmann, SergeyBiryukov.
Fixes #25429.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/25429#comment:9>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list