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-messages/bp-messages-classes.php

    r4736 r4770  
    176176
    177177        $count = 0;
    178         for ( $i = 0; $i < count( $unread_counts ); $i++ ) {
     178        for ( $i = 0, $count = count( $unread_counts ); $i < $count; ++$i ) {
    179179            $count += $unread_counts[$i]->unread_count;
    180180        }
     
    342342
    343343        if ( is_array( $recipient_usernames ) ) {
    344             for ( $i = 0; $i < count($recipient_usernames); $i++ ) {
     344            for ( $i = 0, $count = count( $recipient_usernames ); $i < $count; ++$i ) {
    345345                if ( $rid = bp_core_get_userid( trim($recipient_usernames[$i]) ) )
    346346                    $recipient_ids[] = $rid;
Note: See TracChangeset for help on using the changeset viewer.