Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
07/21/2011 10:27:09 PM (13 years ago)
Author:
djpaul
Message:

Tune up 'for' loops. Fixes #2985, props cnorris23 and r-a-y

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-groups/bp-groups-functions.php

    r4729 r4770  
    645645    $group = new BP_Groups_Group( $group_id );
    646646
    647     for ( $i = 0; $i < count( $invited_users ); $i++ ) {
     647    for ( $i = 0, $count = count( $invited_users ); $i < $count; ++$i ) {
    648648        $member = new BP_Groups_Member( $invited_users[$i], $group_id );
    649649
     
    779779
    780780        // Saved okay, now send the email notification
    781         for ( $i = 0; $i < count( $admins ); $i++ )
     781        for ( $i = 0, $count = count( $admins ); $i < $count; ++$i )
    782782            groups_notification_new_membership_request( $requesting_user_id, $admins[$i]->user_id, $group_id, $requesting_user->id );
    783783
Note: See TracChangeset for help on using the changeset viewer.