Make WordPress Core

Changeset 57251

Timestamp:
01/08/2024 10:42:49 PM (7 months ago)
Author:
SergeyBiryukov
Message:

Taxonomy: Check for empty term after DB sanitization in wp_insert_term().

When inserting a new term in the database, wp_insert_term() will check if the term is empty and return a corresponding error.

Afterwards the term is sanitized and inserted in the database. However, there is a chance the term is empty after the DB sanitization.

This commit adds a check for an empty term name after the term is sanitized, returning an error in that case.

Follow-up to [5726], [8393].

Props fgiannar, kraftbj.
Fixes #59995.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
Note: See TracChangeset for help on using the changeset viewer.