diff --git a/wp-includes/taxonomy.php b/wp-includes/taxonomy.php index 69f3fe7484..c314d474e6 100644 --- a/wp-includes/taxonomy.php +++ b/wp-includes/taxonomy.php @@ -1999,6 +1999,10 @@ function wp_delete_object_term_relationships( $object_id, $taxonomies ) { foreach ( (array) $taxonomies as $taxonomy ) { $term_ids = wp_get_object_terms( $object_id, $taxonomy, array( 'fields' => 'ids' ) ); + if ( ! is_array( $term_ids ) ) { + // Skip return value in the case of an error or the 'wp_get_object_terms' filter returning an invalid value. + continue; + } $term_ids = array_map( 'intval', $term_ids ); wp_remove_object_terms( $object_id, $term_ids, $taxonomy ); } diff --git a/wp-includes/version.php b/wp-includes/version.php index 01a30ee390..4b165f84af 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '7.0-alpha-61375'; +$wp_version = '7.0-alpha-61376'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.