Opened 15 months ago
Last modified 8 months ago
#55358 new defect (bug)
Passing int term term_exists parent param not respected
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | |
Component: | Taxonomy | Keywords: | good-first-bug has-patch needs-testing |
Focuses: | Cc: |
Description
If a developer calls terms_exists, with an int as term and parent as an int, the parent value is not respected. So example this will not work.
$term = term_exists( 123, 'category', 1);
The code will check to see if term 123 exists, but will ignore parent value. This may result in correct / unexpected results.
Attachments (2)
Change History (5)
Note: See
TracTickets for help on using
tickets.
Looks more like a problem in the docs to me than an actual bug: if you give the ID as integer you don't need to restrict by parent; if you search by string, restricting by parent can definitely be helpful.