Opened 11 years ago
Closed 11 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: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Taxonomy | Version: | |
| Severity: | normal | Keywords: | close reporter-feedback |
| Cc: | Focuses: |
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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
In what situation would a taxonomy object not have a
labelsproperty? 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