Skip to:
Content

BuddyPress.org

Changeset 3861


Ignore:
Timestamp:
01/24/2011 03:28:22 AM (14 years ago)
Author:
johnjamesjacoby
Message:

Check that menu item exists before running is_array in bp_core_remove_nav_item

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-core/bp-core-buddybar.php

    r3817 r3861  
    236236
    237237    // Unset subnav items for this nav item
    238     if ( is_array( $bp->bp_options_nav[$parent_id] ) ) {
     238    if ( isset( $bp->bp_options_nav[$parent_id] ) && is_array( $bp->bp_options_nav[$parent_id] ) ) {
    239239        foreach( (array)$bp->bp_options_nav[$parent_id] as $subnav_item ) {
    240240            bp_core_remove_subnav_item( $parent_id, $subnav_item['slug'] );
     
    243243
    244244    if ( $function = $bp->bp_nav[$parent_id]['screen_function'] ) {
    245         if ( !is_object( $function[0] ) )
     245        if ( !is_object( $function[0] ) ) {
    246246            remove_action( 'wp', $function, 3 );
    247         else
     247        } else {
    248248            remove_action( 'wp', array( &$function[0], $function[1] ), 3 );
     249        }
    249250    }
    250251
Note: See TracChangeset for help on using the changeset viewer.