Skip to:
Content

BuddyPress.org

Changeset 3357


Ignore:
Timestamp:
11/05/2010 09:37:15 PM (15 years ago)
Author:
djpaul
Message:

Fix some wp_debug warnings.

Location:
trunk
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-core.php

    r3354 r3357  
    147147
    148148    /* Fetches the default Gravatar image to use if the user/group/blog has no avatar or gravatar */
    149     $bp->grav_default->user  = apply_filters( 'bp_user_gravatar_default', $bp->site_options['user-avatar-default'] );
     149    $default_grav = isset( $bp->site_options['user-avatar-default'] ) ? $bp->site_options['user-avatar-default'] : 'wavatar';
     150    $bp->grav_default->user  = apply_filters( 'bp_user_gravatar_default', $default_grav );
    150151    $bp->grav_default->group = apply_filters( 'bp_group_gravatar_default', 'identicon' );
    151152    $bp->grav_default->blog  = apply_filters( 'bp_blog_gravatar_default', 'identicon' );
     
    10181019            $ud = false;
    10191020
    1020             if ( $bp->loggedin_user->id == $user_id )
     1021            if ( isset( $bp->loggedin_user->id ) && $bp->loggedin_user->id == $user_id )
    10211022                $ud = &$bp->loggedin_user->userdata;
    10221023
    1023             if ( $bp->displayed_user->id == $user_id )
     1024            if ( isset( $bp->displayed_user->id ) && $bp->displayed_user->id == $user_id )
    10241025                $ud = &$bp->displayed_user->userdata;
    10251026
     
    11381139    if ( !$fullname = wp_cache_get( 'bp_user_fullname_' . $user_id, 'bp' ) ) {
    11391140        if ( bp_is_active( 'xprofile' ) ) {
    1140             $fullname = xprofile_get_field_data( BP_XPROFILE_FULLNAME_FIELD_NAME, $user_id );
     1141            $fullname = xprofile_get_field_data( $bp->site_options['bp-xprofile-fullname-field-name'], $user_id );
    11411142
    11421143            if ( empty($fullname) ) {
     
    13151316    global $bp;
    13161317
    1317     if ( empty( $bp->template_message ) )
     1318    if ( empty( $bp->template_message ) && isset( $_COOKIE['bp-message'] ) )
    13181319        $bp->template_message = $_COOKIE['bp-message'];
    13191320
    1320     if ( empty( $bp->template_message_type ) )
     1321    if ( empty( $bp->template_message_type ) && isset( $_COOKIE['bp-message-type'] ) )
    13211322        $bp->template_message_type = $_COOKIE['bp-message-type'];
    13221323
  • trunk/bp-core/bp-core-avatars.php

    r3343 r3357  
    3333
    3434    if ( !defined( 'BP_AVATAR_ORIGINAL_MAX_FILESIZE' ) ) {
    35         if ( !$bp->site_options['fileupload_maxk'] )
     35        if ( !isset( $bp->site_options['fileupload_maxk'] ) )
    3636            define( 'BP_AVATAR_ORIGINAL_MAX_FILESIZE', 5120000 ); /* 5mb */
    3737        else
  • trunk/bp-core/bp-core-catchuri.php

    r3324 r3357  
    164164                unset( $bp_uri[$i] );
    165165
    166             $current_component = $bp_uri[$uri_offset];
     166            $current_component = isset( $bp_uri[$uri_offset] ) ? $bp_uri[$uri_offset] : '';
    167167        }
    168168    }
     
    185185
    186186    // Set the current action
    187     $current_action = $bp_uri[$i];
     187    $current_action = isset( $bp_uri[$i] ) ? $bp_uri[$i] : '';
    188188
    189189    // Unset the current_component and action from action_variables
     
    195195
    196196    // Remove the username from action variables if this is not a VHOST install
    197     if ( 'no' == VHOST && !$is_root_component )
     197    if ( defined( 'VHOST' ) && 'no' == VHOST && !$is_root_component )
    198198        array_shift($bp_uri);
    199199
  • trunk/bp-core/bp-core-notifications.php

    r3300 r3357  
    4343    for ( $i = 0; $i < count($notifications); $i++ ) {
    4444        $notification = $notifications[$i];
    45 
    4645        $grouped_notifications[$notification->component_name][$notification->component_action][] = $notification;
    4746    }
    4847
    49     if ( !$grouped_notifications )
     48    if ( empty( $grouped_notifications ) )
    5049        return false;
    5150
  • trunk/bp-core/bp-core-templatetags.php

    r3341 r3357  
    15691569    global $bp;
    15701570
    1571     if ( BP_BLOGS_SLUG == $bp->current_component )
     1571    if ( is_multisite() && BP_BLOGS_SLUG == $bp->current_component )
    15721572        return true;
    15731573
  • trunk/bp-forums.php

    r3347 r3357  
    2121
    2222    $bp->forums->image_base = BP_PLUGIN_URL . '/bp-forums/images';
    23     $bp->forums->bbconfig = $bp->site_options['bb-config-location'];
    2423    $bp->forums->slug = BP_FORUMS_SLUG;
     24
     25    if ( isset( $bp->site_options['bb-config-location'] ) )
     26        $bp->forums->bbconfig = $bp->site_options['bb-config-location'];
    2527
    2628    /* Register this in the active components array */
     
    536538    global $bp, $wp_roles, $bb_table_prefix;
    537539
     540    if ( !isset( $bp->loggedin_user->id ) )
     541        return $allcaps;
     542
    538543    $bb_cap = get_user_meta( $bp->loggedin_user->id, $bb_table_prefix . 'capabilities', true );
    539544
  • trunk/bp-groups.php

    r3347 r3357  
    166166    global $bp;
    167167
    168     if ( !$bp->groups->current_group )
     168    if ( empty( $bp->groups->current_group ) )
    169169        return false;
    170170
  • trunk/bp-messages.php

    r3300 r3357  
    4141
    4242    /* Add the subnav items to the profile */
    43     bp_core_new_subnav_item( array( 'name' => __( 'Inbox', 'buddypress' ) . $count_indicator, 'slug' => 'inbox', 'parent_url' => $messages_link, 'parent_slug' => $bp->messages->slug, 'screen_function' => 'messages_screen_inbox', 'position' => 10, 'user_has_access' => bp_is_my_profile() ) );
     43    bp_core_new_subnav_item( array( 'name' => __( 'Inbox', 'buddypress' ), 'slug' => 'inbox', 'parent_url' => $messages_link, 'parent_slug' => $bp->messages->slug, 'screen_function' => 'messages_screen_inbox', 'position' => 10, 'user_has_access' => bp_is_my_profile() ) );
    4444    bp_core_new_subnav_item( array( 'name' => __( 'Sent Messages', 'buddypress' ), 'slug' => 'sentbox', 'parent_url' => $messages_link, 'parent_slug' => $bp->messages->slug, 'screen_function' => 'messages_screen_sentbox', 'position' => 20, 'user_has_access' => bp_is_my_profile() ) );
    4545    bp_core_new_subnav_item( array( 'name' => __( 'Compose', 'buddypress' ), 'slug' => 'compose', 'parent_url' => $messages_link, 'parent_slug' => $bp->messages->slug, 'screen_function' => 'messages_screen_compose', 'position' => 30, 'user_has_access' => bp_is_my_profile() ) );
  • trunk/bp-xprofile/bp-xprofile-classes.php

    r3300 r3357  
    474474        global $wpdb, $bp;
    475475
    476         if ( !$bp->profile->table_name_fields || !$field_name )
     476        if ( empty( $bp->profile->table_name_fields ) || !isset( $field_name ) )
    477477            return false;
    478478
Note: See TracChangeset for help on using the changeset viewer.