mirror of
https://github.com/WordPress/WordPress.git
synced 2024-09-29 23:57:41 +02: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. Built from https://develop.svn.wordpress.org/trunk@31392 git-svn-id: http://core.svn.wordpress.org/trunk@31373 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
980668299c
commit
72f18cb067
@ -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',
|
||||
|
@ -4,7 +4,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.2-alpha-31391';
|
||||
$wp_version = '4.2-alpha-31392';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user