Skip to:
Content

BuddyPress.org

Changeset 3369 for trunk/bp-friends.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-friends.php

    r3331 r3369  
    7676    global $bp;
    7777
    78     if ( isset($bp->action_variables) && 'accept' == $bp->action_variables[0] && is_numeric($bp->action_variables[1]) ) {
     78    if ( isset( $bp->action_variables[0] ) && isset( $bp->action_variables[1] ) && 'accept' == $bp->action_variables[0] && is_numeric( $bp->action_variables[1] ) ) {
    7979        /* Check the nonce */
    8080        check_admin_referer( 'friends_accept_friendship' );
    8181
    82         if ( friends_accept_friendship( $bp->action_variables[1] ) ) {
     82        if ( friends_accept_friendship( $bp->action_variables[1] ) )
    8383            bp_core_add_message( __( 'Friendship accepted', 'buddypress' ) );
    84         } else {
     84        else
    8585            bp_core_add_message( __( 'Friendship could not be accepted', 'buddypress' ), 'error' );
    86         }
     86
    8787        bp_core_redirect( $bp->loggedin_user->domain . $bp->current_component . '/' . $bp->current_action );
    8888
    89     } else if ( isset($bp->action_variables) && 'reject' == $bp->action_variables[0] && is_numeric($bp->action_variables[1]) ) {
     89    } elseif ( isset( $bp->action_variables[0] ) && isset( $bp->action_variables[1] ) && 'reject' == $bp->action_variables[0] && is_numeric( $bp->action_variables[1] ) ) {
    9090        /* Check the nonce */
    9191        check_admin_referer( 'friends_reject_friendship' );
    9292
    93         if ( friends_reject_friendship( $bp->action_variables[1] ) ) {
     93        if ( friends_reject_friendship( $bp->action_variables[1] ) )
    9494            bp_core_add_message( __( 'Friendship rejected', 'buddypress' ) );
    95         } else {
     95        else
    9696            bp_core_add_message( __( 'Friendship could not be rejected', 'buddypress' ), 'error' );
    97         }
     97
    9898        bp_core_redirect( $bp->loggedin_user->domain . $bp->current_component . '/' . $bp->current_action );
    9999    }
Note: See TracChangeset for help on using the changeset viewer.