diff --git a/wp-includes/class-walker-category.php b/wp-includes/class-walker-category.php index 997993710a..16ad852e5b 100644 --- a/wp-includes/class-walker-category.php +++ b/wp-includes/class-walker-category.php @@ -139,7 +139,7 @@ class Walker_Category extends Walker { $attributes = ''; foreach ( $atts as $attr => $value ) { - if ( ! empty( $value ) ) { + if ( is_scalar( $value ) && '' !== $value && false !== $value ) { $value = ( 'href' === $attr ) ? esc_url( $value ) : esc_attr( $value ); $attributes .= ' ' . $attr . '="' . $value . '"'; } diff --git a/wp-includes/class-walker-nav-menu.php b/wp-includes/class-walker-nav-menu.php index 06070ed0c8..1d0fd714f7 100644 --- a/wp-includes/class-walker-nav-menu.php +++ b/wp-includes/class-walker-nav-menu.php @@ -203,7 +203,7 @@ class Walker_Nav_Menu extends Walker { $attributes = ''; foreach ( $atts as $attr => $value ) { - if ( ! empty( $value ) ) { + if ( is_scalar( $value ) && '' !== $value && false !== $value ) { $value = ( 'href' === $attr ) ? esc_url( $value ) : esc_attr( $value ); $attributes .= ' ' . $attr . '="' . $value . '"'; } diff --git a/wp-includes/class-walker-page.php b/wp-includes/class-walker-page.php index 27e06c9b5d..eac5a4f9fd 100644 --- a/wp-includes/class-walker-page.php +++ b/wp-includes/class-walker-page.php @@ -182,7 +182,7 @@ class Walker_Page extends Walker { $attributes = ''; foreach ( $atts as $attr => $value ) { - if ( ! empty( $value ) ) { + if ( is_scalar( $value ) && '' !== $value && false !== $value ) { $value = ( 'href' === $attr ) ? esc_url( $value ) : esc_attr( $value ); $attributes .= ' ' . $attr . '="' . $value . '"'; } diff --git a/wp-includes/version.php b/wp-includes/version.php index e6a78946a9..ae07930480 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.3-beta2-46412'; +$wp_version = '5.3-beta2-46413'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.