Opened 17 years ago
Closed 17 years ago
#12707 closed defect (bug) (fixed)
term_description() shouldn't return error objects
| Reported by: | filosofo | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | 3.0 |
| Component: | Template | Version: | 3.0 |
| Severity: | normal | Keywords: | has-patch term_description commit |
| Cc: | Focuses: |
Description
term_description() and its wrappers like category_description() are meant to be used in templates, so they shouldn't return WP_Error objects.
However, if you call term_description() for a non-existent term you get a fatal error as PHP attempts to treat the WP_Error object as a string.
Patch instead returns an empty string when an error bubbles up to term_description().
Attachments (1)
Change History (3)
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Looks good.