Opened 10 years ago
Closed 9 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 |
---|---|---|---|
Milestone: | 4.4 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Taxonomy | Keywords: | has-patch |
Focuses: | administration | Cc: |
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.
This patch should stop fatal PHP errors from being thrown when the value of
get_terms_to_edit()
is aWP_Error
orboolean
.@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