WordPress.org

Make WordPress Core

Ticket #47720: 47720.2.diff

File 47720.2.diff, 564 bytes (added by AkSDvP, 16 months ago)
  • src/wp-includes/class-walker-nav-menu.php

    diff --git a/src/wp-includes/class-walker-nav-menu.php b/src/wp-includes/class-walker-nav-menu.php
    index 06070ed0c8..42e0269664 100644
    a b class Walker_Nav_Menu extends Walker { 
    203203
    204204                $attributes = '';
    205205                foreach ( $atts as $attr => $value ) {
    206                         if ( ! empty( $value ) ) {
     206                    if ( isset( $value ) ) {
     207
    207208                                $value       = ( 'href' === $attr ) ? esc_url( $value ) : esc_attr( $value );
    208209                                $attributes .= ' ' . $attr . '="' . $value . '"';
    209210                        }