Opened 12 years ago
Closed 11 years ago
#30472 closed defect (bug) (fixed)
get_terms_to_edit() can return a WP_Error, but used as a string
| Reported by: | dd32 | Owned by: | wonderboymusic |
|---|---|---|---|
| Priority: | normal | Milestone: | 4.4 |
| Component: | Taxonomy | Version: | |
| Severity: | normal | Keywords: | has-patch |
| Cc: | Focuses: | administration |
Description
As noted in #28319 get_terms_to_edit() can return string|bool|WP_Error, but in a number of places we simply treat it as a string, causing a PHP Fatal.
Attachments (1)
Change History (5)
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
This patch should stop fatal PHP errors from being thrown when the value of
get_terms_to_edit()is aWP_Errororboolean.@dd32 could you please provide some information on how you caused the error in the first place so I can properly test the patch and also write unit tests if needed.
Cheers,
Derek