Skip to:
Content

BuddyPress.org

Changeset 3369 for trunk/bp-groups.php


Ignore:
Timestamp:
11/07/2010 12:20:02 AM (14 years ago)
Author:
djpaul
Message:

Fixes even more WP_DEBUG warnings.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-groups.php

    r3360 r3369  
    217217    global $bp;
    218218
    219     $group_id = $bp->action_variables[1];
    220 
    221     if ( isset($bp->action_variables) && in_array( 'accept', (array)$bp->action_variables ) && is_numeric($group_id) ) {
     219    $group_id = 0;
     220    if ( isset( $bp->action_variables[1] ) )
     221        $group_id = $bp->action_variables[1];
     222
     223    if ( isset( $bp->action_variables ) && in_array( 'accept', (array)$bp->action_variables ) && is_numeric( $group_id ) ) {
    222224        /* Check the nonce */
    223225        if ( !check_admin_referer( 'groups_accept_invite' ) )
     
    241243        bp_core_redirect( $bp->loggedin_user->domain . $bp->current_component . '/' . $bp->current_action );
    242244
    243     } else if ( isset($bp->action_variables) && in_array( 'reject', (array)$bp->action_variables ) && is_numeric($group_id) ) {
     245    } elseif ( isset( $bp->action_variables ) && in_array( 'reject', (array)$bp->action_variables ) && is_numeric( $group_id ) ) {
    244246        /* Check the nonce */
    245247        if ( !check_admin_referer( 'groups_reject_invite' ) )
    246248            return false;
    247249
    248         if ( !groups_reject_invite( $bp->loggedin_user->id, $group_id ) ) {
     250        if ( !groups_reject_invite( $bp->loggedin_user->id, $group_id ) )
    249251            bp_core_add_message( __('Group invite could not be rejected', 'buddypress'), 'error' );
    250         } else {
     252        else
    251253            bp_core_add_message( __('Group invite rejected', 'buddypress') );
    252         }
    253254
    254255        bp_core_redirect( $bp->loggedin_user->domain . $bp->current_component . '/' . $bp->current_action );
     
    12441245    global $bp, $wp_query;
    12451246
    1246     if ( !bp_is_active( 'activity' ) || $bp->current_component != $bp->groups->slug || !$bp->groups->current_group || $bp->current_action != 'feed' )
     1247    if ( !bp_is_active( 'activity' ) || $bp->current_component != $bp->groups->slug || !isset( $bp->groups->current_group ) || $bp->current_action != 'feed' )
    12471248        return false;
    12481249
Note: See TracChangeset for help on using the changeset viewer.