Taxonomy: Initialize `$noparents` variable in `wp_ajax_add_tag()` to avoid a notice with `compact()` in PHP 7.3.

Props pilou69.
Fixes #46670.
Built from https://develop.svn.wordpress.org/trunk@45034


git-svn-id: http://core.svn.wordpress.org/trunk@44843 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2019-03-27 15:33:52 +00:00
parent 06bb67be06
commit 7807324652
2 changed files with 4 additions and 2 deletions

View File

@ -1027,7 +1027,9 @@ function wp_ajax_add_tag() {
$wp_list_table = _get_list_table( 'WP_Terms_List_Table', array( 'screen' => $_POST['screen'] ) );
$level = 0;
$level = 0;
$noparents = '';
if ( is_taxonomy_hierarchical( $taxonomy ) ) {
$level = count( get_ancestors( $tag->term_id, $taxonomy, 'taxonomy' ) );
ob_start();

View File

@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.2-alpha-45033';
$wp_version = '5.2-alpha-45034';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.