Make WordPress Core


Ignore:
Timestamp:
02/09/2015 10:53:40 PM (10 years ago)
Author:
boonebgorges
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/post.php

    r31359 r31392  
    338338            $clean_terms = array();
    339339            foreach ( $terms as $term ) {
     340                // Empty terms are invalid input.
     341                if ( empty( $term ) ) {
     342                    continue;
     343                }
     344
    340345                $_term = get_terms( $taxonomy, array(
    341346                    'name' => $term,
Note: See TracChangeset for help on using the changeset viewer.