Opened 9 years ago
Closed 9 years ago
#32830 closed defect (bug) (wontfix)
get_taxonomy_labels() does not check for the existence of the labels property
Reported by: | ipm-frommen | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Taxonomy | Keywords: | close reporter-feedback |
Focuses: | Cc: |
Description
Inside get_taxonomy_labels()
, we currently just access the labels
property of the given $tax
object. In case the object does not have any labels, this generates a PHP Notice.
The attached patch includes a fix for this.
Attachments (1)
Change History (4)
Note: See
TracTickets for help on using
tickets.
In what situation would a taxonomy object not have a
labels
property? Inregister_taxonomy()
, it's enforced: https://core.trac.wordpress.org/browser/tags/4.2.2/src/wp-includes/taxonomy.php?marks=330,347,414#L323