WordPress.org

Make WordPress Core

Ticket #21576: 21576.patch

File 21576.patch, 686 bytes (added by obenland, 6 years ago)
  • wp-includes/nav-menu-template.php

     
    171171                && $args->fallback_cb && is_callable( $args->fallback_cb ) )
    172172                        return call_user_func( $args->fallback_cb, (array) $args );
    173173
    174         // If no fallback function was specified and the menu doesn't exists, bail.
    175         if ( !$menu || is_wp_error($menu) )
     174        // If no fallback function was specified and the menu doesn't exist or has no items, bail.
     175        if ( !$menu || is_wp_error( $menu ) || empty( $menu_items ) )
    176176                return false;
    177177
    178178        $nav_menu = $items = '';