Skip to:
Content

BuddyPress.org

Ticket #7931: 7931.01.patch

File 7931.01.patch, 780 bytes (added by r-a-y, 12 months ago)
  • src/bp-core/bp-core-buddybar.php

     
    608608        }
    609609
    610610        $parent_nav = $bp->{$component}->nav->get_primary( array( 'slug' => $r['parent_slug'] ), false );
    611         if ( ! $parent_nav ) {
    612                 return ;
     611        if ( is_array( $parent_nav ) ) {
     612                $parent_nav = reset( $parent_nav );
    613613        }
    614614
    615         $parent_nav = reset( $parent_nav );
    616 
    617615        // If we *do* meet condition (2), then the added subnav item is currently being requested.
    618616        if ( ( bp_current_action() && bp_is_current_action( $r['slug'] ) ) || ( bp_is_user() && ! bp_current_action() && ! empty( $parent_nav->screen_function ) && $r['screen_function'] == $parent_nav->screen_function ) ) {
    619617