Make WordPress Core

Ticket #32781: 32781.diff

File 32781.diff, 648 bytes (added by adamsilverstein, 10 years ago)

Add explicit check for isset( $args->fallback_cb ) before using

  • wp-includes/nav-menu-template.php

     
    308308         *  - Otherwise, bail.
    309309         */
    310310        if ( ( !$menu || is_wp_error($menu) || ( isset($menu_items) && empty($menu_items) && !$args->theme_location ) )
    311                 && $args->fallback_cb && is_callable( $args->fallback_cb ) )
     311                && isset( $args->fallback_cb ) && $args->fallback_cb && is_callable( $args->fallback_cb ) )
    312312                        return call_user_func( $args->fallback_cb, (array) $args );
    313313
    314314        if ( ! $menu || is_wp_error( $menu ) )