[wp-trac] [WordPress Trac] #39984: wp_insert_term can return wrong ID when multiple existing terms are found with the same name but differnet parent
WordPress Trac
noreply at wordpress.org
Fri Mar 3 02:49:15 UTC 2017
#39984: wp_insert_term can return wrong ID when multiple existing terms are found
with the same name but differnet parent
-------------------------------------------------+-------------------------
Reporter: mikejolley | Owner:
Type: defect (bug) | boonebgorges
Priority: normal | Status: closed
Component: Taxonomy | Milestone: 4.8
Severity: normal | Version: 4.2
Keywords: has-patch dev-feedback needs- | Resolution: fixed
testing | Focuses:
-------------------------------------------------+-------------------------
Changes (by boonebgorges):
* status: accepted => closed
* resolution: => fixed
Comment:
In [changeset:"40145"]:
{{{
#!CommitTicketReference repository="" revision="40145"
Taxonomy: Take 'parent' into account when checking for terms with
duplicate names.
Terms with duplicate names are not allowed at the same level of a
taxonomy hierarchy. The name lookup introduced in [34809] did not
properly account for the 'parent' parameter, with the result that
the duplicate-name restriction was tighter than intended (terms
with duplicate names could not be created at different levels of
a single hierarchy).
Props mikejolley.
Fixes #39984.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/39984#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list