Opened 16 years ago
Closed 16 years ago
#12707 closed defect (bug) (fixed)
term_description() shouldn't return error objects
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | 3.0 | Priority: | normal |
| Severity: | normal | Version: | 3.0 |
| Component: | Template | Keywords: | has-patch term_description commit |
| Focuses: | Cc: |
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.
Looks good.