mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-10-06 23:58:03 +00:00
Don't parse empty 'tax_input' keys in edit_post().
This fixes a bug introduced in [31359] where saving a tax_input that contained only whitespace would result in a random tag being erroneously added to the post. See #30615. git-svn-id: https://develop.svn.wordpress.org/trunk@31392 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -337,6 +337,11 @@ function edit_post( $post_data = null ) {
|
||||
|
||||
$clean_terms = array();
|
||||
foreach ( $terms as $term ) {
|
||||
// Empty terms are invalid input.
|
||||
if ( empty( $term ) ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$_term = get_terms( $taxonomy, array(
|
||||
'name' => $term,
|
||||
'fields' => 'ids',
|
||||
|
||||
Reference in New Issue
Block a user