[wp-trac] [WordPress Trac] #55358: Passing int term term_exists parent param not respected
WordPress Trac
noreply at wordpress.org
Wed Mar 9 18:31:11 UTC 2022
#55358: Passing int term term_exists parent param not respected
-------------------------+-------------------------------------------------
Reporter: | Owner: (none)
spacedmonkey |
Type: defect | Status: new
(bug) |
Priority: normal | Milestone: Awaiting Review
Component: Taxonomy | Version:
Severity: normal | Keywords: needs-patch needs-unit-tests good-
Focuses: | first-bug
-------------------------+-------------------------------------------------
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.
{{{#!php
$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.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/55358>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list